Skeleton : helper

Skeleton - superclass: helper; super-superclass:node - 13:0 - classID: #(139273060, 2023492905)

This object represents the MassFX Skeleton Helper. It is used to introduce characters as Kinematic Skeleton objects that can affect but cannot be affected by physical simulations.

Available in 3ds Max 2012 and higher.

Constructor:

The Kinematic Skeleton helper cannot be constructed directly by MAXScript. It can be constructed using the nvpx Core Interface as follows:

nvpx.CreateRagdollHelper()

Aliases:

Skeleton
RagdollHelper

Properties:

"Bones and Groups" group of controls

<Skeleton>.bones     ArrayParameter    default: #()   --  node array; None

Get/set the associated bones as an array of nodes.

<Skeleton>.bonegroupids     ArrayParameter    default: #()   --  int array; None

Get/set the bone group IDs as an array of integers.

<Skeleton>.bonegroupnames     ArrayParameter    default: #()   --  string array; None

Get/set the bone group names as an array of strings.

"Physical Mesh" group of controls

<Skeleton>.meshType     Integer    default: 0   --  integer; None

Get/set the type of physical mesh to create around the bones when regenerating the skeleton.

Possible values are:

0 - Capsule

1 - Convex Hull

<Skeleton>.meshfrom     Integer    default: 0   --  integer; None

The skeleton can size the capsule or convex hull physical mesh (see preceding) for a bone to fit around either the skinned mesh or the bones themselves.

Possible values are:

0 - Skinned Mesh - This option finds the vertices in the associated skin mesh that have a weighting above the specified Weight threshold (see following) and fits the capsule or convex hull around them. This option is unavailable if you created your skeleton from a rig that has no associated skin mesh. When available, this option is the default.

1 - Bones - The option fits the physical mesh around the shape of the bone. This option is typically useful only when a character mesh is not available.

<Skeleton>.inflation     Float    default: 0.0   --  float; None

Get/set the amount to inflate the convex hull or capsule beyond the cloud of vertices or bone. Can be negative if you want to contract the physical mesh to be within the skinned mesh.

<Skeleton>.weight     Float    default: 0.5   --  float; None

Get/set the Weight treshold used when finding associated vertices in the skinned mesh. A lower value will include more vertices per bone, reusing some vertices for multiple overlapping bones

"Associated Skin" rollout

<Skeleton>.associatedSkin     UndefinedClass    default: undefined   --  node; None

Get/set the Associated Skin mesh.

<Skeleton>.ragdollSkin     UndefinedClass    default: undefined   --  node; None

Get/set the ragdoll skin.

<Skeleton>.joints     ArrayParameter    default: #()   --  node array; None

Get/set the array if joints.

<Skeleton>.rootBone     UndefinedClass    default: undefined   --  node; None

Get/set the root bone node.

<Skeleton>.rbType     Integer    default: 0   --  integer; None

Not exposed to the UI.

<Skeleton>.helpersize     Float    default: 10.0   --  float; None

Not exposed to the UI. Not used.

Skeleton interfaces:

Interface: interface 

Methods:

"Bones & Groups" group of controls

<boolean><Skeleton>.RagdollSave <string>filename

Saves the Ragdoll to a MassFX Skeleton .RAG file.

<boolean><Skeleton>.RagdollLoad <string>filename

Loads a Ragdoll definition from the supplied MassFX Skeleton .RAG file.

<void><Skeleton>.RagdollAddBone <node>boneNode

Adds the supplied Bone node to the Bones and Groups list.

<void><Skeleton>.RagdollRemoveBone <node>boneNode

Removes the specified Bone node.

<boolean><Skeleton>.RagdollGroupBones <&node array>bones

bones is In and Out parameter

Groups the bones specified by the by-reference array argument. Equivalent to the "Group" button in the UI.

Regenerate and Mirror

<void><Skeleton>.RagdollRegenerate <&node array>bones 

bones is In and Out parameter

Regenerates the Ragdoll using the bones specified by-reference.

<boolean><Skeleton>.RagdollMirrorBone <node>fromBone <node>toBone
<void><Skeleton>.create <boolean>reset

Regenerates the Skeleton. If the argument is true, it will be reset.

<void><Skeleton>.removeAll()

Utility MAXScript Functions

A number of helpful Ragdoll-related MAXScript Functions are defined in the file ..\stdplugs\stdscripts\(MassFX)\px_ragdoll.ms