View Full Version : Selecting all instances

01 January 2009, 05:11 PM
Hi All,
How do you go about selecting all objects that have an instance of a particular modifier on it?
For example, I select $object01 which has an "edit_mesh" on it, which is instanced and I want to automatically select all other objects that also have that instanced modifier on it.

01 January 2009, 08:31 PM
something like...

mymod = $.modifiers[1]
objs = for ref in (refs.dependents mymod) where ( isKindOf ref GeometryClass ) collect ( ref )
#($Editable_Mesh:GeoSphere01 @ [33.579334,7.011070,0.000001], $Editable_Mesh:GeoSphere02 @ [107.380074,17.343174,0.000002])

or you could manually traverse the objects collection (array), then go over each modifier on those objects, and check if that modifier matches the modifier of interest.

CGTalk Moderation
01 January 2009, 08:31 PM
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.