pymel.core.nodetypes.IkHandle

Inheritance diagram of IkHandle

class IkHandle(*args, **kwargs)

class counterpart of mel function ikHandle

The handle command is used to create, edit, and query a handle within Maya. The standard edit (-e) and query (-q) flags are used for edit and query functions. If there are 2 joints selected and neither -startJoint nor -endEffector flags are not specified, then the handle will be created from the selected joints. If a single joint is selected and neither -startJoint nor -endEffector flags are specified, then the handle will be created with the selected joint as the end-effector and the start joint will be the top of the joint chain containing the end effector. The default values of the flags are: -name ikHandle#-priority 1-weight 1.0-positionWeight 1.0-solver ikRPsolver-forceSolver on-snapHandleFlagToggle on-sticky off-createCurve true-simplifyCurve true-rootOnCurve true-twistType linear-createRootAxis false-parentCurve true-snapCurve false-numSpans 1-rootTwistMode false.These attributes can be specified in creation mode, edited in edit mode (-e) or queried in query mode (-q).

autoPriority(val=True, **kwargs)

Specifies that this handle’s priority is assigned automatically. The assigned priority will be based on the hierarchy distance from the root of the skeletal chain to the start joint of the handle.

Derived from mel command maya.cmds.ikHandle

connectEffector(val=True, **kwargs)

This option is set to true as default, meaning that end-effector translate is connected with the endJoint translate.

Derived from mel command maya.cmds.ikHandle

disableHandles(val=True, **kwargs)

set given handles to full fk (ikBlend attribute = 0.0)

Derived from mel command maya.cmds.ikHandle

enableHandles(val=True, **kwargs)

set given handles to full ik (ikBlend attribute = 1.0)

Derived from mel command maya.cmds.ikHandle

freezeJoints(val=True, **kwargs)

Forces the curve, specfied by -curve option, to align itself along the existing joint chain. When false, or unspecified, the joints will be moved to positions along the specified curve.

Derived from mel command maya.cmds.ikHandle

getCurve(**kwargs)

Specifies the curve to be used by the ikSplineHandle. Joints will be moved to align with this curve. This flag is mandatory if you use the -freezeJoints option.

Derived from mel command maya.cmds.ikHandle

getEffector()

Get a dag path to the end-effector of the handle’s joint chain.

Return type:PyNode

Derived from api method maya.OpenMayaAnim.MFnIkHandle.getEffector

getEndEffector(**kwargs)

Specifies the end-effector of the handle’s joint chain. The end effector may be specified with a joint or an end-effector. If a joint is specified, an end-effector will be created at the same position as the joint and this new end-effector will be used as the end-effector.

Derived from mel command maya.cmds.ikHandle

getForceSolver(**kwargs)

Forces the solver to be used everytime. It could also be known as animSticky. So, after you set the first key the handle is sticky.

Derived from mel command maya.cmds.ikHandle

getJointList(**kwargs)

Returns the list of joints that the handle is manipulating.

Derived from mel command maya.cmds.ikHandle

getPositionWeight(**kwargs)

Specifies the position/orientation weight of a handle. This is used to compute the distancebetween the goal position and the end-effector position. A positionWeight of 1.0 computes the distance as the distance between positions only and ignores the orientations. A positionWeight of 0.0 computes the distance as the distance between the orientations only and ignores the positions. A positionWeight of 0.5 attempts to weight the distances equally but cannot actually compute this due to unit differences. Because there is no way to add linear units and angular units.

Derived from mel command maya.cmds.ikHandle

getPriority()

Get the priority of this handle in case a solution is affected by more than one handle.

Return type:int

Derived from api method maya.OpenMayaAnim.MFnIkHandle.priority

getRootOnCurve(**kwargs)

Specifies if the root is locked onto the curve of the ikSplineHandle.

Derived from mel command maya.cmds.ikHandle

getRootTwistMode(**kwargs)

Specifies whether the start joint is allowed to twist or not. If not, then the required twist is distributed over the remaining joints. This applies to all the twist types. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.ikHandle

getSnapHandleFlagToggle(**kwargs)

Specifies that the handle position should be snapped to the end-effector position if the end-effector is moved by the user. Setting this flag on allows you to use forward kinematics to pose or adjust your skeleton and then to animate it with inverse kinematics.

Derived from mel command maya.cmds.ikHandle

getSolver()

Returns the solver attached to this handle.

Return type:PyNode

Derived from api method maya.OpenMayaAnim.MFnIkHandle.solver

getStartJoint()

This method will get a dag path to the starting joint of the handle’s joint chain.

Return type:PyNode

Derived from api method maya.OpenMayaAnim.MFnIkHandle.getStartJoint

getStickiness()

Get the stickiness of this handle.

Return type:IkHandle.Stickiness

Derived from api method maya.OpenMayaAnim.MFnIkHandle.stickiness

getSticky(**kwargs)

Specifies that this handle is sticky. Valid values are off, sticky, superSticky. Sticky handles are solved when the skeleton is being manipulated interactively. If a character has sticky feet, the solver will attempt to keep them in the same position as the user moves the character’s root. If they were not sticky, they would move along with the root.

Derived from mel command maya.cmds.ikHandle

getTwistType(**kwargs)

Specifies the type of interpolation to be used by the ikSplineHandle. The interpolation options are linear, easeIn, easeOut, and easeInOut.

Derived from mel command maya.cmds.ikHandle

getWeight()

Get the handles weight in error calculations. The weight only applies when handle goals are in conflict and cannot be solved simultaneously. When this happens, a solution is computed that weights the “distance” from each goal to the solution by the handle’s weight and attempts to minimize this value. The weight must be >= 0.

Return type:float

Derived from api method maya.OpenMayaAnim.MFnIkHandle.weight

poWeight()

Gets the position/orientation weight of a handle. This is used to compute the “distance” between the goal position and the end-effector position.

Return type:float

Derived from api method maya.OpenMayaAnim.MFnIkHandle.poWeight

setCurve(val=True, **kwargs)

Specifies the curve to be used by the ikSplineHandle. Joints will be moved to align with this curve. This flag is mandatory if you use the -freezeJoints option.

Derived from mel command maya.cmds.ikHandle

setEffector(effectorPath)

Set the dag path to the end-effector of the handle’s joint chain. The end-effector/joint must be on the same skeletal chain as the start joint or this method will fail.

Parameters :
effectorPath : PyNode

The path for the effector

Derived from api method maya.OpenMayaAnim.MFnIkHandle.setEffector

setEndEffector(val=True, **kwargs)

Specifies the end-effector of the handle’s joint chain. The end effector may be specified with a joint or an end-effector. If a joint is specified, an end-effector will be created at the same position as the joint and this new end-effector will be used as the end-effector.

Derived from mel command maya.cmds.ikHandle

setForceSolver(val=True, **kwargs)

Forces the solver to be used everytime. It could also be known as animSticky. So, after you set the first key the handle is sticky.

Derived from mel command maya.cmds.ikHandle

setPOWeight(poWeight)

Sets the position/orientation weight of a handle. This is used to compute the “distance” between the goal position and the end-effector position.

Parameters :
poWeight : float

The position/orientation weight to be set

Derived from api method maya.OpenMayaAnim.MFnIkHandle.setPOWeight

Undo is not currently supported for this method

setPositionWeight(val=True, **kwargs)

Specifies the position/orientation weight of a handle. This is used to compute the distancebetween the goal position and the end-effector position. A positionWeight of 1.0 computes the distance as the distance between positions only and ignores the orientations. A positionWeight of 0.0 computes the distance as the distance between the orientations only and ignores the positions. A positionWeight of 0.5 attempts to weight the distances equally but cannot actually compute this due to unit differences. Because there is no way to add linear units and angular units.

Derived from mel command maya.cmds.ikHandle

setPriority(priority)

Set the priority of this handle in case a solution is affected by more than one handle

Parameters :
priority : int

The priority to set for this handle

Derived from api method maya.OpenMayaAnim.MFnIkHandle.setPriority

setRootOnCurve(val=True, **kwargs)

Specifies if the root is locked onto the curve of the ikSplineHandle.

Derived from mel command maya.cmds.ikHandle

setRootTwistMode(val=True, **kwargs)

Specifies whether the start joint is allowed to twist or not. If not, then the required twist is distributed over the remaining joints. This applies to all the twist types. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.ikHandle

setSnapHandleFlagToggle(val=True, **kwargs)

Specifies that the handle position should be snapped to the end-effector position if the end-effector is moved by the user. Setting this flag on allows you to use forward kinematics to pose or adjust your skeleton and then to animate it with inverse kinematics.

Derived from mel command maya.cmds.ikHandle

setSolver(solver)

Set the solver for this handle.

Parameters :
solver : PyNode

The solver for this handle

Derived from api method maya.OpenMayaAnim.MFnIkHandle.setSolver

setStartJoint(jointPath)

This method will set the dag path for the starting joint of the handle’s joint chain. The start joint must be on the same skeletal chain as the end effector or this method will fail.

Parameters :
jointPath : PyNode

The dag path to the joint that will be set

Derived from api method maya.OpenMayaAnim.MFnIkHandle.setStartJoint

setStartJointAndEffector(jointPath, effectorPath)

This method will set the dag path for the starting joint and the end-effector of the handle’s joint chain. This method must be used when setting the joints for a handle that are in a different skeletal chain then the current one.

Parameters :
jointPath : PyNode

The dag path to the joint that will be set

effectorPath : PyNode

The path for the effector

Derived from api method maya.OpenMayaAnim.MFnIkHandle.setStartJointAndEffector

Undo is not currently supported for this method

setStickiness(stickiness)

Set the stickiness of this handle. Sticky handles are solved when the skeleton is being manipulated interactively. If a character has sticky feet, the solver will attempt to keep them in the same position as the user moves the character’s root. If they were not sticky, they would move along with the root.

Parameters :
stickiness : IkHandle.Stickiness

The stickiness value to be set.

values: ‘stickyOff’, ‘stickyOn’, ‘superSticky’

Derived from api method maya.OpenMayaAnim.MFnIkHandle.setStickiness

setSticky(val=True, **kwargs)

Specifies that this handle is sticky. Valid values are off, sticky, superSticky. Sticky handles are solved when the skeleton is being manipulated interactively. If a character has sticky feet, the solver will attempt to keep them in the same position as the user moves the character’s root. If they were not sticky, they would move along with the root.

Derived from mel command maya.cmds.ikHandle

setTwistType(val=True, **kwargs)

Specifies the type of interpolation to be used by the ikSplineHandle. The interpolation options are linear, easeIn, easeOut, and easeInOut.

Derived from mel command maya.cmds.ikHandle

setWeight(weight)

Specifies the handles weight in error calculations. The weight only applies when handle goals are in conflict and cannot be solved simultaneously. When this happens, a solution is computed that weights the “distance” from each goal to the solution by the handle’s weight and attempts to minimize this value. The weight must be >= 0.

Parameters :
weight : float

The weight value to be set

Derived from api method maya.OpenMayaAnim.MFnIkHandle.setWeight

setupForRPsolver(val=True, **kwargs)

If the flag is set and ikSolver is ikRPsolver, call RPRotateSetup for the new ikHandle. It is for ikRPsolver only.

Derived from mel command maya.cmds.ikHandle

snapHandleToEffector(val=True, **kwargs)

All handles are immediately moved so that the handle position and orientation matches the end-effector position and orientation.

Derived from mel command maya.cmds.ikHandle

Previous topic

pymel.core.nodetypes.IkEffector

Next topic

pymel.core.nodetypes.IkMCsolver

Core

Core Modules

Other Modules

This Page