CLCollection - superclass: Helper; super-superclass:Node - classID: #(998836098, 492768222)
Constructors:
CLCollection ...
rctCLCollection ...
Properties
.disabled : boolean
When set to True, the CLCollection will not be considered by the simulation.
.internalSteps (Internal_Steps) : integer
Controls the number of internal substeps per keyframe performed by the Cloth simulation - corresponds to the "Internal Steps" spinner in the Advanced rollout.
Interface: rctClothCollectionInterface
Properties:
.cloths : node by value array : Read|Write
Get/Set the array of cloth nodes in the collection.
.disabled : boolean : Read|Write
Enable/Disable the collection.
Methods:
<boolean>addCloth <node>node
Adds a cloth node to the collection. Returns true on success. Returns false if the node does not have a reactor_Cloth : Modifier applied.
<boolean>removeClothIndex <integer>index
Removes the indexed cloth node from the collection. Returns true on success.
<boolean>removeCloth <node>node
Removes the specified cloth node from the collection. Returns true on success.
<integer>getNumCloths()
Returns the number of cloth nodes in the collection.
For Example:
clc = CLCollection() --create a CLCollection
$CLCollection:CLCollection01 @ [0.000000,0.000000,0.000000]
b = Box() --create a Box
$Box:Box01 @ [0.000000,0.000000,0.000000]
clc.addCloth b --try to add the Box to the Cloth
false --you cannot - no reactor cloth modifier!
addModifier b (reactor_cloth()) --add reactor_cloth to the Box
OK
clc.addCloth b --and try again
true --this time it works!
clc.getNumCloths() --check the number of cloths in the collection
1 --there is one
clc.cloths --let's see the whole array
#($Editable_Mesh:Box01 @ [0.000000,0.000000,0.000000])
clc.removeClothIndex 1 --remove the one cloth from the list
true --gone!
clc.removeClothIndex 1 --try to remove it again
false --you cannot, there are none left...
See also
MAXScript Extensions for Reactor