GENERATE/PREV.gifGENERATE/NEXT.gif

Modifier : MAXWrapper

The modifier family of classes can be created and added to an object's modifier stack, using the addModifier function. By making a single modifier and adding it to several objects, you are sharing the modifier between the objects. The constructors in the following classes can take any of the listed properties as optional keyword arguments with the defaults as shown.

Existing modifiers can be accessed in two ways:

  1. As a property access on a <node>. When you access a property on a <node> scene object, such as its name or position, or length, MAXScript will also consider modifiers on the object to be properties, for example:

$box1.heightsegs      -- get creation parameter

$box1.twist      -- get the twist modifier

$box1.twist.angle      -- the twist's angle

  1. You can then access modifier properties as sub properties on the modifier as shown. If the modifier name has spaces in it, you can use the '_' as space convention that pathnames use, like this:

$box1.uvw_map      -- to get the 'UVW Map' modifier

This will work in simple situations, but there may be several modifiers with the same name, or a modifier with the same name as a creation parameter (which is always looked for first). In this situation you can use the modifier array mechanism, which yields an array of modifiers's you can index into:

$box1.modifiers      -- get modifier array

$box1.modifiers[2]      -- get the 3rd down the list

$box1.modifiers[#twist]      -- get the one name twist

$box1.modifiers["ffd 4x4x4"]      -- get the ffd

As you can see from the examples, you can use both name literals and strings to index modifiers by name in the table, so this is a way to get at modifiers with characters you can’t use in a MAXScript property name.

The ordering is as you would see in the modifier panel, numbered starting at 1 from top-to-bottom.

All modifiers have a name property:

properties

.name <string>      -- get and set modifier name

The following list displays the modifier objects:

Bend

Extrude

Linked_xform

NoiseModifier

Optimize

Ripple

Skew

Smooth

NormalModifier

Lathe

Taper

Twist

UVWmap

Volumeselect

Wave