PDA

View Full Version : modifier class filter


holycause
08-29-2009, 11:04 PM
i was wondering how i could create a function that would check if one of my modifiers class is ie Bend?

I need it for a selectByName filter.

I tried severals things but nothing worked.

denisT
08-29-2009, 11:25 PM
i was wondering how i could create a function that would check if one of my modifiers class is ie Bend?

I need it for a selectByName filter.

I tried severals things but nothing worked.


bend_modifiers = getClassInstances Bend


it returns the list of all Bend Modifiers used in the scene... If the array is empty - there is no Band Modifiers in the scene.

holycause
08-30-2009, 07:42 AM
my explanation was incomplete.
I would like to see in my select by name dialog all the objects with a specific modifier

TzMtN
08-30-2009, 08:18 AM
maybe this is what you're looking for..

(
fn hasModifier obj modClass =
(
for i = 1 to obj.modifiers.count do
if isKindOf obj.modifiers[i] modClass then
return true
false
)

hasModifier $ bend
)

holycause
08-30-2009, 08:29 AM
thanks a lot, i tried something like this, but without the isKindOf method.

CGTalk Moderation
08-30-2009, 08:29 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.