PDA

View Full Version : Get nodes sharing instanced modifier?


ACFred
06-22-2009, 08:12 PM
Is there a quick way to identify all of the nodes that use the same instanced modifier?
I'd rather not have to iterate through all of the nodes in the scene to get this information.

Ideas?

Thanks,

Alec

PEN
06-22-2009, 08:35 PM
You could use getClassInstances theModifier and then track those backwards for the nodes using refs.dependentNodes.

for x in (getClassInstances bend) do
(
for n in (refs.dependentNodes x) do
(
format "Bend: % Node: %\n" x n
)
)

ACFred
06-22-2009, 10:02 PM
Cool! Thanks Paul.

floopyb
06-23-2009, 03:09 AM
Wouldnt that just get all objects with any bend in the scene applied? Would work fine if you only had one bend that is instanced in the scene, if you have multiple bends and only some are instances and you know an object that has that bend on it you can do:
refs.dependentNodes $.modifiers["Bend"]
and it should give you all the objects with the instance of that bend.

edit: sorry paul, you are listing them all!! ha. I should read posts better!

CGTalk Moderation
06-23-2009, 03:09 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.