PDA

View Full Version : Get number of modifiers


doctorx256
02-15-2008, 10:39 AM
Simple question.
I want to get the number of modifiers that are applied in the selected object.
Then i want to loop throught all the modifiers and check for a specific property.

I can't get my head around it, any help would be really appriciated.

Gravey
02-15-2008, 12:20 PM
count = $.modifiers.count -- get the number of modifiers
-- index loop checking for property called #propertyname
for i = 1 to count where hasProperty $.modifiers[i] #propertyname do
(
-- do something
)
-- OR iterative loop checking for property called #propertyname
for m in $.modifiers where hasProperty m #propertyname do
(
-- do something
)

doctorx256
02-15-2008, 04:07 PM
Thank you very much.

CGTalk Moderation
02-15-2008, 04:07 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.