Selecting all instances

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  01 January 2009
Selecting all instances

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
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.
  01 January 2009
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:06 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.