The Cloth modifier implements the main element of the Cloth system introduced in 3ds Max 8. It provides access to all simulation parameters and controls the actual simulation process.
Get/Set the state of the Show Current State checkbox in the Object rollout.
Get/Set the state of the Show Target State checkbox in the Object rollout.
<Cloth>.showEnabledSolidCollision BooleanClass default: false -- boolean; Show_Enabled_Solid_Collision
Get/Set the state of the Show enabled solid collision checkbox in the Object rollout.
<Cloth>.showEnabledClothCollision BooleanClass default: false -- boolean; Show_Enabled_Cloth_Collision
Get/Set the state of the Show enabledselfcollision checkbox in the Object rollout.
Get/Set the Scale value in cm/unit.
Controls the state of the Gravity checkbutton.
Get/Set the Start Frame value.
Controls the state of the End Frame checkbox. When set to true, the end frame will be used.
Controls the state of the Self Collision checkbox. When set to true, the cloth will calculate self-collisions.Animatable.
Get/Set the Self-Collision value.
Controls the state of the Check Intersections checkbox. When set to true, the cloth will check for self-intersections.
Controls the state of the Solid Collision checkbox. When set to true, the collision will be calculated as solid.
Controls the state of the Use Sewing Springs checkbox. When set to true, the sewing springs will be used.
Controls the state of the Show Sewing Springs checkbox. When set to true, the sewing springs will be shown.
Controls the state of the Sim On Render checkbox. When set to true, the simulation will be performed before rendering.
Get/Set the Simulation Priority value.When Sim On Render is enabled, this value defines the priority of the Cloth simulation to determine the order in which the simulations will be performed.
Controls the state of the Advanced Pinching checkbox.
Controls the state of the Tension checkbox. When set to true, shows the tension of the cloth using colors.
Get/Set the Tension Scale value used when. showTension is set to true. Corresponds to the Tension spinner.
Get/set the relative velocity adjustment value. Not exposed to the UI. Animatable.
Get/set the time scale value. Not exposed to the UI.Animatable.
Get/set the index of the welding method radio buttons.
Available in 3ds Max 2010 and higher.
Get/set the state of the Ignore Backfacing option.
Get/set the state of the Simulate On Mouse Down option.
The following properties are accessible as properties of the Cloth Object ParamBlock2 accessed using the method. getObjectParamBlock() exposed by the ClothOps Mixin Interface. This Parameter Block is associated with a scene object that has a Cloth Modifier applied to it. There is one ReferenceTarget:ParamBlock2 for each object the Cloth Modifier it applied to.
The same ParamBlock2 can be accessed as a property of the Cloth Modifier. The name of the property consists of the name of the scene node followed by "_properties"
Get/Set the name of the cache file.
Get/Set the state of the Force UNC Path checkbox. When set to true, a UNC path will be used for the cache file.
Get/Set whether to export the cache.
Get/Set whether to overwrite the cache file.
Get/Set the material properties application method.
Corresponds to the radio buttons in the Property Assignment Group of controls.
Get/Set the material interpolation bias. Corresponds to the spinner/slider in the Property Assignment Group of controls.
Enable/Disable the use of the Bend map. Corresponds to the checkbox in front of the Bend Map value in the Bend Map group of controls in the Selected Object Rollout.
Get/Set the Bend map strength. Corresponds to the Bend Map value spinner in the Bend Map group of controls in the Selected Object Rollout.
Get/Set the Bend map source. Corresponds to the radio buttons in the Bend Map group of controls in the Selected Object Rollout.
Get/Set the texture map channel when bendMapSource is set to 1. Corresponds to the Map Channel value in the Bend Map group of controls in the Selected Object Rollout.
Get/Set the texture map to use as Bend Map. Corresponds to the map button in the Bend Map group of controls in the Selected Object Rollout.
The following properties are accessible in Vertex Groups. By default, no Vertex Groups exist, resulting in an error message
Be sure to create a vertex group before accessing vertex group parameters.
You caneither use the . getGroupParamBlock() method exposed by the ClothOps Mixin Interface documented later on this page oraccess the properties by specifying theReferenceTarget:ParamBlock2 as a property of the Cloth modifier.In this case, you might have to use the aliases given in brackets.
Get/Set whether the constraint is active or not. Corresponds to the On checkbox in the Group Parameters rollout > Constraint Parameters group of controls.
Get/Set whether the constraint is soft. Corresponds to the Soft checkbox in the Group Parameters rollout > Constraint Parameters group of controls.
Get/Set the constraint offset.Corresponds to the Offset spinner in the Group Parameters rollout > Constraint Parameters group of controls.
Get/Set whether the constraint is relative (true) or absolute (false).Corresponds to the rel checkbox in the Group Parameters rollout > Constraint Parameters group of controls.
Get/Set the constraint strength.Corresponds to the Strength spinner in the Group Parameters rollout > Constraint Parameters group of controls.
Get/Set whether the constraint strength uses the vertex colors. Corresponds to the vc checkbox in the Group Parameters rollout > Constraint Parameters group of controls.
Get/Set the constraint damping.Corresponds to the Damping spinner in the Group Parameters rollout > Constraint Parameters group of controls.
Corresponds to the radio buttons in the Group Parameters rollout.
Get/Set whether to use the radius value. Corresponds to the Radius checkbox in the Group Parameters rollout.
Get/Set the radius value. Corresponds to the Radius spinner in the Group Parameters rollout.
Get/Set the BehaviorSettings checkbox in the behavior group of controls.
Get/Set whether the to process solid collisions in the group.
Get/Set whether the to process self collisions in the group.
Get/Set the Layer value in the behavior group of controls.
Get/Set whether to try to keep the shape. Corresponds to the Keep Shape checkbox in the Group Parameters rollout, behavior group of controls.
Get/Set the Bend % value in the behavior group of controls.
Get/Set the Stretch % value in the behavior group of controls.
Get/Set whether to use the group properties.Corresponds to the Use These Propertiescheckbox in the Group Parameters rollout.
Get/Set the bend resistance along U. Corresponds to the UBend spinner in the Group Parameters rollout.
Get/Set the bend resistance along V. Corresponds to the Bend spinner in the Group Parameters rollout.
Get/Set the bend curve along U. Corresponds to the UB-Curve spinner in the Group Parameters rollout.
Get/Set the bend curve along V.Corresponds to the VB-Curve spinner in the Group Parameters rollout.
Get/Set the stretch resistance along U. Corresponds to the U Stretch spinner in the Group Parameters rollout.
Get/Set the stretch resistance along V. Corresponds to the V Stretch spinner in the Group Parameters rollout.
Get/Set the compression resistance along U.
Corresponds to the UCompress spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Get/Set the compression resistance along V.
Corresponds to the VCompress spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Get/Set the Shear resistance.Corresponds to the Shear spinner in the Group Parameters rollout.
Get/Set the cloth Density.Corresponds to the Density spinner in the Group Parameters rollout.
Get/Set the cloth thickness.Corresponds to the Thickness spinner in the Group Parameters rollout.
Get/Set the cloth-cloth force. Corresponds to the Repulsion spinner in the Group Parameters rollout.
Get/Set the stretch damping. Corresponds to the Damping spinner in the Group Parameters rollout.
Get/Set the airresistance value.Corresponds to the Air Res . spinner in the Group Parameters rollout.
Get/Set the dynamic friction.Corresponds to the Dyn Fric . spinner in the Group Parameters rollout.
Get/Set the static friction.Corresponds to the Static Fric. spinner in the Group Parameters rollout.
Get/Set the cloth-cloth friction. Corresponds to the Self Fric. spinner in the Group Parameters rollout.
Get/Set the scale along U.Corresponds to the U Scale spinner in the Group Parameters rollout.
Get/Set the scale along V.Corresponds to the V Scale spinner in the Group Parameters rollout.
Get/Set the seam force. Corresponds to the Seam Force spinner in the Group Parameters rollout.
Get/Set the collision offset. Corresponds to the Depth spinner in the Group Parameters rollout.
Get/Set the collision offset. Corresponds to the Offset spinner in the Group Parameters rollout.
Get/Set the Plasticity value. Corresponds to the Plasticity spinner in the Group Parameters rollout.
Corresponds to the Cling spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Corresponds to the Pressur spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Get/Set the Pressure Damping value.
Corresponds to the Press. Damp spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Get/Set whether to simulate the cloth as anisotropic. Corresponds to the Anisotropic checkbox in the Group Parameters rollout.
Get/Set whether to use Edge Springs.Corresponds to the UseEdge Springs checkbox in the Group Parameters rollout.
Get/Set the state of the Use Cloth Depth/Offset checkbox.
Get/Set whether to use solid friction or not. Not exposed to the UI.
Enable/Disable Soft Selection.
Enable/Disable the use of Soft Selection distance.
Get/Set the Soft Selection Edge Distance value.
When set to true, soft-selection affects vertices if back-facing faces.
Get/Set the Soft Selection Falloff value.
Get/Set whether to use the Texture map or not. Corresponds to the Use TextureMapcheckbox in the Group Parameters rollout.
Get/Set the Texture map to use. Corresponds to the TextureMap button in the Group Parameters rollout.
Get/Set the map channel to use. Corresponds to the MapChannel spinner in the Group Parameters rollout.
Get/Set whether to use the specified Map channel or the Vertex Color channel. Corresponds to the Mapping Channel radio buttons in the Group Parameters rollout.
Get/Set the friction velocity cutoff.Default is 30.0.
Get/Set the Constraint Material ID.
The clothOps Interface is a Mixin Interfaceexposed by the Cloth Modifier and is NOT a global interface.
The methods listed below can be accessed as methods of the Cloth Modifier itself without specifying the clotOps prefix.
Sometimes the methods require the node to be passed as argument because the modifier could be instanced across multiple nodes and MAXScript needs to know which node to use. See example below:
Returns the parameter block Reference Target of the specified node.
Returns the parameter block Reference Target of the specified named group. This can be used to access the Group parameters.
Returns the number of vertices in the cloth
Selects the vertices specified by the bitArray in the supplied node.
Returns the selected vertices in the supplied node as bitArray.
Makes a constraint from the given group using the specified type and target node.
Creates a Point Groupwith the supplied name from the vertices specified by the bitArrayin the supplied node.
Deletes the Point Group with the supplied name.
Initializes the Point Group with the supplied name.
Detaches the Point Group with the supplied name.
Constrains the Point Group with the supplied name to the target group with the supplied name.
Starts the simulation. If the parameter is true, shows the simulation dialog.
Erases the current simulation. Corresponds to pressing the "Erase Simulation" button in the Cloth modifier's UI.
Truncates the current simulation. Corresponds to pressing the "Truncate Simulation" button in the Cloth modifier's UI.
Sets the current cloth state as the initial state. Corresponds to pressing the "Set Initial State" button in the Cloth modifier's UI.
Resets the cloth state. Corresponds to pressing the "Reset State" button in the Cloth modifier's UI.
Deletes the Object Cache. Corresponds to pressing the "Delete Object Cache" button in the Cloth modifier's UI.
Sets the object type of the specified node to the type specified by the integer parameter. If updateSim is true, updates the simulation.
Possible type integer values are:
Returns the object type of the specified node as integer.
Sets the object property specified by the string name to the supplied value in the specified node.
Returns an array of strings containing all supported object property names.
Grabs the state of the cloth. Corresponds to pressing the "Grab State" button in the Cloth modifier's UI.
Adds the specified Space Warp force to the list of Cloth Forces.
Removes the specified Space Warp force from the list of Cloth Forces.
Exports a cache file for the specified node to the given file name.
Imports a cache file for the specified node from the given file name.
Loads the cache for the specified node.
Saves the cache for the specified node.
Saves an extra cache for the specified node.
Creates a tear in the node specified as second argument defined by the vertex selection specified by the bitArray passed as first argument and named as the string passed as third argument.
Returns the index of the tear.
Available in 3ds Max 2010 and higher.
Clears all tears in the specified node.
Available in 3ds Max 2010 and higher.
Returns the value of the node's property.
The first argument specifies the node to get the property from.
The second argument specifies the name of the property as a string.
The return value depends on the property's type.