MassFX_RBody - superclass: modifier; super-superclass:MAXWrapper - 54:8 - classID: #(685326, 452282)
Value > MAXWrapper > Modifier > MassFX_RBody |
This class implements the MassFX Rigid Body Modifier.
Available in 3ds Max 2012 and higher.
Most of the following Properties are exposed by the MassFX_RBody modifier itself, while the Methods are exposed by the PhysXModRBInterface MixIn Interface.
Gets/sets the state of the "Rigid Body Type" drop-down list.
1 - Dynamic (default) - the Rigid Body is driven by the simulation. It is applied gravitational forces, participates in and reacts to collisions with other Rigid Bodies, and so on. Its Rigid Body Mesh cannot be concave.
2 - Kinematic - the Rigid Body is driven by pre-defined (usually keyframed) animation and can drive Dynamic Rigid Bodies, but is otherwise unaffected by the physics simulation. Its Rigid Body Mesh cannot be concave.
3 - Static - the Rigid Body is unyielding and can interact with Dynamic Rigid Bodies, but cannot be animated. Its Rigid Body Mesh can be concave.
Gets/sets the state of the "Until Frame" checkbox. When set to true, the type of the Rigid Body can be switched from Kinematic to Dynamic at a specified frame provided by the .switchTypeAtFrame property.
Gets/sets the frame on which the Rigid Body will be switched from Kinematic to Dynamic if the .switchType property is set to true.
Gets/sets the state of the "Bake/Unbake" button. When baked, the animation of a Dynamic Rigid Body will be converted to keyframes.
0 - Unbaked - setting the property to 0 will unbake the Rigid Body and switch the button's caption to "Bake".
1 - Baked - setting the property to 1 will bake the Rigid Body and switch the button's caption to "Unbake".
Gets/sets the state of the "Use High Velocity Collisions" option.
If set to true and the global High Velocity Collisions switch in the MassFX World panel is enabled, the Dynamic Rigid Body will perform continuous collision detection.
Gets/sets the state of the "Start In Sleep Mode" option.
When set to true, the Dynamic Rigid Body will be placed in sleep mode at the start of the simulation using the global sleep mode settings. This means that it will not move until struck by a non-sleeping Rigid Body.
Gets/sets the state of the "Collide With Ridig Bodies" option.
When set to true, the Rigid Body will collide with other Rigid Bodies. When set to false, the Rigid Body will not participate in collisions.
Gets/sets the Density value of the Rigid Body. The Density is measured in grams per cubic centimeter. Changing this value automatically calculates the correct mass for the object based on its volume.
Gets/sets the Mass of the Rigid Body measured in kilograms.
Gets/sets the Static Friction value of the Rigid Body's Physical Material.
Static Friction is the degree of difficulty for two Rigid Bodies to start sliding against one another. A value of 0.0 indicates no friction, a value of 1.0 indicates full friction. The effective static friction between two rigid bodies is the product of their static friction values. If one rigid body has a static friction of 0.0, the value of the other rigid body does not matter (everything slides on wet ice; even sandpaper). Once the two objects start sliding, the Dynamic Friction (see below) applies.
Gets/sets the Dynamic Friction value of the Physical Material.
Dynamic Friction is the degree of difficulty for two rigid bodies to keep sliding against one another. Technically, this parameter is called the "coefficient of kinematic friction." A value of 0.0 indicates no friction, a value of 1.0 indicates full friction. In the real world, this value must be less than the coefficient of static friction - it is harder to start pushing an object than to keep it moving. As with static friction, the effective value between two rigid bodies is the product of their respective values.
Gets/sets the Bounciness value of the Rigid Body's Physical Material.
This value controls how an object bounces when it hits another rigid body. Technically, this parameter is called the "coefficient of restitution." A value of 0.0 indicates no bounce, a value of 1.0 indicates that the object will bounce off just about as hard as it hit. The effective bounciness between two rigid bodies is the product of their bounciness values.
<boolean><MassFX_RBody>.SetRBPresetMaterial <integer>materialID
This property is exposed by the "Override Physical Mesh" checkbox's parameter, but must not be used.
Use the methods .GetRBMeshOverrideMasterMat() and .SetRBMeshOverrideMasterMat() documented below to get and set the Override Physical Material option per mesh.
Returns the number of Rigid Body Meshes.
Adds a Rigid Body mesh and returns its index.
Returns the Name of the indexed Rigid Body mesh.
Sets the Name of the indexed Rigid Body mesh to the string passed as second argument.
Deletes the indexed Rigid Body mesh.
Returns true on success, false on failure.
Copies the indexed Rigid Body mesh to the Clipboard.
Returns true on success, false on failure.
Pastes the Rigid Body mesh from the Clipboard, if available.
Returns true on success, false on failure.
Returns the Type of the indexed Rigid Body mesh.
Sets the Type of the indexed Rigid Body mesh to the integer passed as second argument.
Converts the indexed Rigid Body Mesh to Custom Mesh and returns it as a node.
Returns the Override Master Material property of the indexed Rigid Body mesh as boolean value.
Sets the Override Master Material of the indexed Rigid Body mesh to the boolean value passed as second argument.
Returns the transformation matrix of the indexed Rigid Body mesh.
Sets the transformation matrix of the indexed Rigid Body mesh to the matrix3 value passed by the second by-reference argument.
Returns the Shape of the indexed Rigid Body mesh as a TriMesh value.
Sets the Shape of the indexed Rigid Body mesh to the triMesh value passed as second argument.
Regenerates the indexed Rigid Body Mesh.
<integer><MassFX_RBody>.GetRBMeshCompositeMeshCount <integer>meshIndex
Returns the Composite Mesh Count in the indexed Mesh of the Rigid Body.
Returns 0 if there are no composite meshes in the given mesh.
Available in 3ds Max 2013 and higher.
<boolean><MassFX_RBody>.ExtractCustomMesh()
Currently Missing Implementation .
Available in 3ds Max 2013 and higher.
<boolean><MassFX_RBody>.RBMeshCustomNodeExtract <integer>meshIndex
Extracts the indexed mesh hull for use as Custom Node.
Equivalent to pressing the "Convert To Custom Shape" button in the Physical Shapes rollout.
Available in 3ds Max 2013 and higher.
Exposes the Radius spinner's track value. The methods documented below can be used to get and set the Mesh Radius values of specific meshes.
Returns the Radius of the indexed Rigid Body mesh.
Sets the Radius of the indexed Rigid Body mesh to the floating point value passed as second argument.
These properties expose the Length, Width, and Height spinners found in the UI. The methods documented below can be used for getting and setting the Length, Width, and Height of the specific meshes.
Returns the Length of the indexed Rigid Body mesh.
Sets the Length of the indexed Rigid Body mesh to the floating point value passed as second argument.
Returns the Width of the indexed Rigid Body mesh.
Sets the Width of the indexed Rigid Body mesh to the floating point value passed as second argument.
Returns the Height of the indexed Rigid Body mesh.
Sets the Height of the indexed Rigid Body mesh to the floating point value passed as second argument.
Returns the Inflation value of the indexed Rigid Body mesh.
Sets the Inflation of the indexed Rigid Body mesh to the floating point value passed as second argument.
Returns the Vertex Limit of the indexed Rigid Body mesh.
Sets the Vertex Limit of the indexed Rigid Body mesh to the integer value passed as second argument.
Gets/sets the Maximum number of vertices in the Mesh Hull.
Gets/sets the Composite Split Levels value.
Available in 3ds Max 2013 and higher.
Gets/sets the Inflation value.
<MassFX_RBody>.compositeSizeDiff Integer default: 90 -- integer
Gets/sets the Composite Size Difference percentage value.
Previously, exposed as .compositeSizeDifference .
Available in 3ds Max 2013 and higher.
Gets/sets the Composite Shrink Wrap percentage value.
Gets/sets the Composite Granularity percentage value.
<MassFX_RBody>.compositeMaxConcavity Float default: 100.0 -- float
Gets/sets the Composite Maximum Concavity value.
Corresponds to the "Concavity" property in the Physical Mesh Parameters rollout.
Available in 3ds Max 2013 and higher.
<MassFX_RBody>.compositeMinHulls Integer default: 1 -- integer
Gets/sets the minimum number of composite hulls to create.
Available in 3ds Max 2013 and higher.
<MassFX_RBody>.compositeConnDist Float default: 0.0 -- float
Gets/sets the Composite Connection Distance value.
Available in 3ds Max 2013 and higher.
<MassFX_RBody>.compositeControlPoints Integer default: 1 -- integer
Gets/sets the number of Composite Control Points.
Available in 3ds Max 2013 and higher.
<MassFX_RBody>.compositeSolidMeshes BooleanClass default: false -- boolean
Gets/sets whether to display Solid Meshes or not.
Corresponds to the Display Solid Meshes checkbox in the UI.
Available in 3ds Max 2013 and higher.
Generates the Composite Mesh of the indexed Rigid Body Mesh.
Returns true on success, false on failure.
Returns the Composite Mesh count.
Returns the indexed Composite Mesh specified by the second argument of the Rigid Body Mesh (specified by the first argument).
Returns the Custom Node of the indexed Rigid Body mesh.
Sets the Custom Node of the indexed Rigid Body mesh to the node value passed as the second argument.
Returns True on success, False on failure.
<boolean><MassFX_RBody>.RBMeshCustomNodeUpdateFromSource <integer>meshIndex
Updates the indexed shape from the source object.
Equivalent to pressing the "Update From Source Object" button in the modifier's UI.
Returns True on success, False on failure.
Gets/sets the state of the "Use Gravity" option.
If set to true and if the global Gravity switch in the MassFX World panel is enabled, the Dynamic Rigid Body will be affected by Gravity.
<MassFX_RBody>.forcesList : node array
Gets/sets the array of Force SpaceWarp objects associated with the MassFX Rigid Body simulation.
Array operations like append() and deleteItem() are supported.
Gets/sets the state of the "Override Solver Iterations" checkbox.
When set to False (default), the global Iterations count will be used.
When set to True, the MassFX Rigid Body modifier will use the custom number of iterations specified by the .SolverIterValue property (see below).
Gets/sets the "Override Solver Iterations" value that is used when the MassFX Rigid Body Modifier's .SolverIter property (see above) is set to True.
<MassFX_RBody>.EnableBackfaceCollision : boolean
Gets/sets whether to use Backface Collision or not.
Gets/sets the state of the Initial Motion Style radio buttons.
Gets/sets the Initial Velocity X, Y, and Z values of the Rigid Body. These define the direction of the initial velocity.
Gets/sets the Initial Velocity's Speed value of the Rigid Body. This defines the magnitude of the Initial Velocity.
Gets/sets the Initial Spin X, Y, and Z values of the Rigid Body. These define the axis of the initial spin.
<MassFX_RBody>.MassCenterMode : integer
Gets/sets the state of the Center Of Mass radio buttons.
Available in 3ds Max 2013 and higher.
Gets/sets the X, Y, and Z coordinates of the Rigid Body's Center Of Mass in object space.
See the method .CalculateMassCenter() below for setting these values automatically based on the Rigid Body's meshes.
Calculates the Center Of Mass and sets the properties .MassCenterX , .MassCenterY , and .MassCenterZ . Returns the result as a Point3 value.