Notifications
Clear all

[Closed] Get number of modifiers

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.

2 Replies
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
)

Thank you very much.