MasterZ
09-15-2006, 07:31 PM
New to scripting in XSI, I set out to do something simple and obvious but am stuck saying what the...
I create a sphere and select two polygons
CreatePrim "Sphere", "MeshSurface"
SelectGeometryComponents "sphere.poly[4, 53]"
I then want to actually have access to the polygons so one assumes
Getting the Selection returns items to access but it seems to return something useless...
a polySubComponent being undocumented and responding to mostly nothing.
I'm left saying how do I actually use that to access the obj (obsolete too).
set curSel = Selection
for each seldPolys in curSel
logMessage seldPolys
logMessage seldPolys.type
'elmArray = seldPolys.componentCollection
'logMessage elmArray
'logMessage TypeName(seldPolys)
'logMessage ClassName(seldPolys)
'logMessage seldPolys.NestedObjects
next
you get
'INFO : sphere.poly[4,53]
'INFO : polySubComponent
which apparently is not a usable array of polygons which is what I would need... the items are the selected polygons. no?
I create a sphere and select two polygons
CreatePrim "Sphere", "MeshSurface"
SelectGeometryComponents "sphere.poly[4, 53]"
I then want to actually have access to the polygons so one assumes
Getting the Selection returns items to access but it seems to return something useless...
a polySubComponent being undocumented and responding to mostly nothing.
I'm left saying how do I actually use that to access the obj (obsolete too).
set curSel = Selection
for each seldPolys in curSel
logMessage seldPolys
logMessage seldPolys.type
'elmArray = seldPolys.componentCollection
'logMessage elmArray
'logMessage TypeName(seldPolys)
'logMessage ClassName(seldPolys)
'logMessage seldPolys.NestedObjects
next
you get
'INFO : sphere.poly[4,53]
'INFO : polySubComponent
which apparently is not a usable array of polygons which is what I would need... the items are the selected polygons. no?
