Go to: Synopsis. Flags. Return value. Related. Python examples.
connectJoint(
[objects]
, [connectMode=boolean], [parentMode=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
connectJoint is undoable, queryable, and editable.
This cmd will connect two skeletons based on the selected two joints.
The first selected joint can be made a child of the parent of the second
selected joint or a child of the second selected joint, depending on
the flags used.
Note1: The first selected joint must be the root of a skeleton.
The second selected joint must have a parent.
Note2: If a joint name is specified in the cmd line, it is used as the
child and the first selected joint will be the parent. If no joint
name is given at the cmd line, two joints must be selected.
connectMode, parentMode
Long name (short name) |
[argument types] |
Properties |
parentMode(pm)
|
boolean
|
|
|
The first selected joint will be parented under the second selected
joint. Both joints will be in the active list(selection list).
|
|
connectMode(cm)
|
boolean
|
|
|
The first selected joint will be parented under the parent of the
second selected joint.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
None
ikHandle, ikHandleDisplayScale, ikSolver, ikSystem, ikSystemInfo, insertJoint, joint, jointCluster, jointDisplayScale, jointLattice, mirrorJoint, removeJoint, removeJoint
import maya.cmds as cmds
# make joint1 a child of joint4.
#
cmds.connectJoint( 'joint1', 'joint4', pm=True )
# make joint1 a child of joint4's parent
#
cmds.connectJoint( 'joint1', 'joint4', cm=True )