import rhinoscriptsyntax as rs
import scriptcontext
import Rhino
if ACTIVE:
for i in range(len(GEO)):
scriptcontext.doc = ghdoc
GEO_id = GEO[i]
doc_object = rs.coercerhinoobject(GEO_id)
attributes = doc_object.Attributes
geometry = doc_object.Geometry
scriptcontext.doc = Rhino.RhinoDoc.ActiveDoc
rhino_obj = scriptcontext.doc.Objects.Add(geometry, attributes)
rs.ObjectColor(rhino_obj, color[i])
mat_id = rs.AddMaterialToObject(rhino_obj)
rs.MaterialColor(mat_id, color[i])
"Runtime error (TypeErrorException): 'Color' object is unsubscriptable Traceback: line 23, in script"
I have no idea why the "ObjectColor" is unscriptable, I have matched it with the python API so many times. AM I not seeing something that I should?