How can I change the color of a geometry inside python?
I want to use the: GeometryColor.ByGeometryColor
inside of a python node
you have to add the reference ‘GeometryColor’ and from the modifier class import GeometryColor
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('GeometryColor')
from Modifiers import GeometryColor
geom = IN[0]
color = IN[1]
OUT = GeometryColor.ByGeometryColor(geom, color)
An extra tip:
to be able to manipulate colors inside of python use the following references as well:
clr.AddReference('DSCoreNodes')
import DSCore
from DSCore import *