Repository navigation
Basic Usage
boneDynamicsNode allows dynamics settings for one section (2 joints) per node. When applying dynamics to a joint chain with multiple joints, create one boneDynamicsNode for each adjacent joint pair.
basic_usage.py applies boneDynamicsNode to a selected joint chain. Select the joints from root to tip in order, then run the script. It loops over each adjacent pair in the selection and calls bdn.create_dynamics_node(bone, end) for each section.
from maya import cmds
import bdn
# Select in order from root to tip of the joint-chain
joints = cmds.ls(sl=True)
# Create a dynamics node for each bone section in the selected joint-chain.
# bdn.create_dynamics_node returns the created node.
bd_nodes = []
for bone, end in zip(joints[:-1], joints[1:]):
bd_node = bdn.create_dynamics_node(bone, end)
bd_nodes.append(bd_node)
-
Enable: Disables all calculations when turned off. -
Reset Time: Dynamics are disabled when the current frame is equal to or less than this value. This is the start frame of the simulation. -
Fps: Used to calculate delta time. Enter a value equal to the FPS of the scene. When usingbdn.create_dynamics_node(), iffpsis not specified, it is retrieved from the current scene's time units and set.
For detailed dynamics settings, refer to Dynamics Parameters.
Check the following settings to ensure correct results:
- Set "Playback Speed" to Play Every Frame.
- Disable "Cached Playback".
Tip
Starting from version 0.4.2, "Cached Playback" is automatically disabled by the node.
There are several requirements for joint states. If you create joints with Create Joints and set Orient Joint, these requirements should normally be met.
- Rotate should be [0,0,0], with only Joint Orient having a value.
- Do not edit rotatePivot, rotatePivotTranslate, scalePivot, or scalePivotTranslate.
- Rotate Order is only available for xyz.
- Rotate Axis should remain [0,0,0].
- Keep Inherits Transform checked.
- Keep Offset Parent Matrix at its default value.
- Receive InverseScale from the parent Scale and keep Segment Scale Compensate checked. Shear is not supported.

Before rendering, bake to keyframes to finalize the dynamics behavior. To bake, select the joint and execute Bake Simulation from the Key menu, then delete the boneDynamicsNode.