How to tell if a given ICETree object is simulated or not?

7 views
Skip to first unread message

Alan Fregtman

unread,
Feb 17, 2011, 4:34:17 PM2/17/11
to XSI Mailing List
Hey guys,

I get that I can obtain an object's .ActivePrimitive.ICETrees and it
lists me them, but how do I know which are simulated? How can I tell
where they are in the stack?

Any help appreciated.
Cheers,

-- Alan

Stephen Blair

unread,
Feb 17, 2011, 4:47:00 PM2/17/11
to soft...@listproc.autodesk.com
To find them in the stack, I would think Primitive.ConstructionHistory or, more likely, DataRepository.GetConnectionStackInfo.
winmail.dat

Alan Fregtman

unread,
Feb 17, 2011, 5:30:01 PM2/17/11
to soft...@listproc.autodesk.com
DataRepository wouldn't return anything, but ConstructionHistory did the trick.

For anyone curious, my Python solution follows:

# ---------------------------------
xsi = Application

obj = xsi.Selection(0)
markers = ["secondaryshapemarker","postsimulationmarker","simulationmarker","animationmarker","shapemarker","modelingmarker"]
opstack = obj.ActivePrimitive.ConstructionHistory

for op in opstack:
if any([op.FullName.endswith("."+marker) for marker in markers]):
lastMarker = op.FullName

if xsi.ClassName(op) == "ICETree":
print op.FullName+" is under marker: "+lastMarker.split(".")[-1]

# ---------------------------------

Thanks Stephen! (and Xavier at the studio. ;)

-- Alan

Reply all
Reply to author
Forward
0 new messages