Get class of a modifer

I execute  a simple action by script.

I have an object with an 'Edit Poly' modifier on it and the script bevels the selected polygons of the modifier:

$.modifiers[#Edit_Poly].SetOperation #Bevel
$.modifiers[#Edit_Poly].bevelHeight = 3
$.modifiers[#Edit_Poly].Commit ()

This works fine.

What I'm trying to do is replace [#Edit_Poly] by a variable. That for I use:
$.modifiers

which in the MAXScript Listener puts out:
#modifiers(Edit Poly:Edit Poly)

My question is how to get the class of
#modifiers(Edit Poly:Edit Poly)

inorder to be able to use
[#Edit_Poly]

Does anyone have an idea?

 

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ewok's picture

.

.

jos's picture

I'm not sure what you mean.

I'm not sure what you mean. But this is how you can get the class of a modifier :

$.modifiers -- returns #modifiers(Edit Poly:Edit Poly)
classOf $.modifiers[1] -- returns Edit_Poly
Ewok's picture

Great! It's exactely what I

Great!

It's exactely what I meant.

Thank you very much.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.