Accessing overrides in different passes

12 views
Skip to first unread message

Felix Geremus

unread,
May 23, 2013, 5:53:10 AM5/23/13
to soft...@listproc.autodesk.com
Hi list!

Does anybody know a way to access overrides via script without switching
to the pass the override lives in? I need to collect data from all
overrides in the scene and cycling through all passes becomes quite
unstable with heavy scenes....

Cheers,

Felix

Gareth Bell

unread,
May 23, 2013, 6:03:38 AM5/23/13
to soft...@listproc.autodesk.com
You can access them by partitions local properties and then the overrides parameters for the entries e.g. something like this:

for eachProp in eachPartition.localproperties:
if eachProp.Type == "#Override":
for eachParam in eachProp.parameters:
print eachParam


________________________________________
From: softimag...@listproc.autodesk.com [softimag...@listproc.autodesk.com] on behalf of Felix Geremus [felixg...@googlemail.com]
Sent: 23 May 2013 10:53
To: soft...@listproc.autodesk.com
Subject: Accessing overrides in different passes

Felix Geremus

unread,
May 23, 2013, 11:29:05 AM5/23/13
to soft...@listproc.autodesk.com
Thanks Gareth! I wasn't aware of the difference between properties and localproperties.
I was confused because while I'm in another pass
print Application.ActiveProject.ActiveScene.Passes("Pass").Properties("Override")
didn't work. But
print Application.ActiveProject.ActiveScene.Passes("Pass").LocalProperties("Override")
works....

Thanks again!

Alan Fregtman

unread,
May 23, 2013, 11:36:11 AM5/23/13
to XSI Mailing List
The difference is LocalProperties accesses only the properties applied to that object whereas the other one is the equivalent of the inherited properties + the local properties slapped on top.

You know when you see a property in italics? That means it's inherited from somewhere else (probably up the hierarchy.) When they are local they are not italic.

Also interesting is in the Explorer, at the top, the second menu (View) has an option down there to switch between "Applied Properties" and "Local Properties". Try toggling that and you'll see what's local or not. It's "Applied Properties" by default I believe.

Felix Geremus

unread,
May 23, 2013, 11:53:00 AM5/23/13
to soft...@listproc.autodesk.com
But that doesn't explain my case I think?
while:
print Application.ActiveProject.ActiveScene.Passes("Pass").LocalProperties("mental ray")
print Application.ActiveProject.ActiveScene.Passes("Pass").Properties("mental ray")

both work with a localized mental ray property, but only


print Application.ActiveProject.ActiveScene.Passes("Pass").LocalProperties("Override")

works with with an Override as soon as I'm not in the pass.
Reply all
Reply to author
Forward
0 new messages