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.
Gets/sets the state of the Show Current State checkbox in the Object rollout.
Gets/sets the state of the Show Target State checkbox in the Object rollout.
<Cloth>.showEnabledSolidCollision BooleanClass default: false -- boolean; Show_Enabled_Solid_Collision
Gets/sets the state of the Show enabled solid collision checkbox in the Object rollout.
<Cloth>.showEnabledClothCollision BooleanClass default: false -- boolean; Show_Enabled_Cloth_Collision
Gets/sets the state of the Show enabled self collision checkbox in the Object rollout.
Gets/sets the Scale value in cm/unit.
Controls the state of the Gravity checkbutton.
Gets/sets the Sub sample value.
Gets/sets the Start Frame value.
Controls the state of the End Frame checkbox. When set to true, the end frame will be used.
Gets/sets the End Frame value.
Controls the state of the Self Collision checkbox. When set to true, the cloth will calculate self-collisions. Animatable.
Gets/sets 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.
Gets/sets 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.
Gets/sets the Tension Scale value used when. showTension is set to true. Corresponds to the Tension spinner.
Gets/sets the relative velocity adjustment value. Not exposed to the UI. Animatable.
Gets/sets the time scale value. Not exposed to the UI. Animatable.
Gets/sets the index of the welding method radio buttons.
Available in 3ds Max 2010 and higher.
Gets/sets the state of the Ignore Backfacing option.
Gets/sets 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 is 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".
Gets/sets the name of the cache file.
Gets/sets the state of the Force UNC Path checkbox. When set to true, a UNC path will be used for the cache file.
Gets/sets whether to export the cache.
Gets/sets whether to overwrite the cache file.
Gets/sets the material properties application method.
Corresponds to the radio buttons in the Property Assignment Group of controls.
Gets/sets the material interpolation bias. Corresponds to the spinner/slider in the Property Assignment Group of controls.
Enables/disables 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.
Gets/sets the Bend map strength. Corresponds to the Bend Map value spinner in the Bend Map group of controls in the Selected Object Rollout.
Gets/sets the Bend map source. Corresponds to the radio buttons in the Bend Map group of controls in the Selected Object Rollout.
Gets/sets 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.
Gets/sets 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 can either use the . getGroupParamBlock() method exposed by the ClothOps Mixin Interface documented later in this topic or access the properties by specifying the ReferenceTarget:ParamBlock2 as a property of the Cloth modifier. In this case, you might have to use the aliases given in brackets.
Gets/sets whether the constraint is active or not. Corresponds to the On checkbox in the Group Parameters rollout > Constraint Parameters group of controls.
Gets/sets whether the constraint is soft. Corresponds to the Soft checkbox in the Group Parameters rollout > Constraint Parameters group of controls.
Gets/sets the constraint offset. Corresponds to the Offset spinner in the Group Parameters rollout > Constraint Parameters group of controls.
Gets/sets whether the constraint is relative (true) or absolute (false).Corresponds to the rel checkbox in the Group Parameters rollout > Constraint Parameters group of controls.
Gets/sets the constraint strength. Corresponds to the Strength spinner in the Group Parameters rollout > Constraint Parameters group of controls.
Gets/sets whether the constraint strength uses the vertex colors. Corresponds to the vc checkbox in the Group Parameters rollout > Constraint Parameters group of controls.
Gets/sets 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.
Gets/sets whether to use the radius value. Corresponds to the Radius checkbox in the Group Parameters rollout.
Gets/sets the radius value. Corresponds to the Radius spinner in the Group Parameters rollout.
Gets/sets the BehaviorSettings checkbox in the behavior group of controls.
Gets/sets whether the to process solid collisions in the group.
Gets/sets whether the to process self collisions in the group.
Gets/sets the Layer value in the behavior group of controls.
Gets/sets whether to try to keep the shape. Corresponds to the Keep Shape checkbox in the Group Parameters rollout, behavior group of controls.
Gets/sets the Bend % value in the behavior group of controls.
Gets/sets the Stretch % value in the behavior group of controls.
Gets/sets whether to use the group properties. Corresponds to the Use These Propertiescheckbox in the Group Parameters rollout.
Gets/sets the bend resistance along U. Corresponds to the UBend spinner in the Group Parameters rollout.
Gets/sets the bend resistance along V. Corresponds to the Bend spinner in the Group Parameters rollout.
Gets/sets the bend curve along U. Corresponds to the UB-Curve spinner in the Group Parameters rollout.
Gets/sets the bend curve along V. Corresponds to the VB-Curve spinner in the Group Parameters rollout.
Gets/sets the stretch resistance along U. Corresponds to the U Stretch spinner in the Group Parameters rollout.
Gets/sets the stretch resistance along V. Corresponds to the V Stretch spinner in the Group Parameters rollout.
Gets/sets the compression resistance along U.
Corresponds to the UCompress spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Gets/sets the compression resistance along V.
Corresponds to the VCompress spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Gets/sets the Shear resistance. Corresponds to the Shear spinner in the Group Parameters rollout.
Gets/sets the cloth Density. Corresponds to the Density spinner in the Group Parameters rollout.
Gets/sets the cloth thickness. Corresponds to the Thickness spinner in the Group Parameters rollout.
Gets/sets the cloth-cloth force. Corresponds to the Repulsion spinner in the Group Parameters rollout.
Gets/sets the stretch damping. Corresponds to the Damping spinner in the Group Parameters rollout.
Gets/sets the air resistance value. Corresponds to the Air Res . spinner in the Group Parameters rollout.
Gets/sets the dynamic friction. Corresponds to the Dyn Fric . spinner in the Group Parameters rollout.
Gets/sets the static friction. Corresponds to the Static Fric. spinner in the Group Parameters rollout.
Gets/sets the cloth-cloth friction. Corresponds to the Self Fric. spinner in the Group Parameters rollout.
Gets/sets the scale along U. Corresponds to the U Scale spinner in the Group Parameters rollout.
Gets/sets the scale along V. Corresponds to the V Scale spinner in the Group Parameters rollout.
Gets/sets the seam force. Corresponds to the Seam Force spinner in the Group Parameters rollout.
Gets/sets the collision offset. Corresponds to the Depth spinner in the Group Parameters rollout.
Gets/sets the collision offset. Corresponds to the Offset spinner in the Group Parameters rollout.
Gets/sets the Plasticity value. Corresponds to the Plasticity spinner in the Group Parameters rollout.
Gets/sets the Plasticity value.
Corresponds to the Cling spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Corresponds to the Pressure spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Gets/sets the Pressure Damping value.
Corresponds to the Press. Damp spinner in the Group Parameters rollout.
Available in 3ds Max 2010 and higher.
Gets/sets whether to simulate the cloth as anisotropic. Corresponds to the Anisotropic checkbox in the Group Parameters rollout.
Gets/sets whether to use Edge Springs. Corresponds to the UseEdge Springs checkbox in the Group Parameters rollout.
Gets/sets the state of the Use Cloth Depth/Offset checkbox.
Gets/sets whether to use solid friction or not. Not exposed to the UI.
Enables/disables Soft Selection.
Enables/disables the use of Soft Selection distance.
Gets/sets the Soft Selection Edge Distance value.
When set to true, soft-selection affects vertices if back-facing faces.
Gets/sets the Soft Selection Falloff value.
Gets/sets whether to use the Texture map or not. Corresponds to the Use TextureMap checkbox in the Group Parameters rollout.
Gets/sets the Texture map to use. Corresponds to the TextureMap button in the Group Parameters rollout.
Gets/sets the map channel to use. Corresponds to the MapChannel spinner in the Group Parameters rollout.
Gets/sets whether to use the specified Map channel or the Vertex Color channel. Corresponds to the Mapping Channel radio buttons in the Group Parameters rollout.
Gets/sets the friction velocity cutoff. Default is 30.0.
Gets/sets the Constraint Material ID.
The clothOps Interface is a Mixin Interface exposed 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 clothOps prefix.
Sometimes the methods require the node to be passed as argument because the modifier can be instanced across multiple nodes and MAXScript needs to know which node to use. See the 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 Group with 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.