View Full Version : Get nodes sharing instanced modifier?

06 June 2009, 07: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.




06 June 2009, 07: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

06 June 2009, 09:02 PM
Cool! Thanks Paul.

06 June 2009, 02: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 June 2009, 02: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.