GeometryColor.ByGeometryColor inside Python

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)
2 Likes