Joints can be created using hou.ik.Skeleton.addJoint.
Methods ¶
worldTransform()
→ hou.Matrix4
Returns the joint’s world space transform.
setWorldTransform(xform)
Sets the joint’s world space transform (a hou.Matrix4).
parent()
→ hou.ik.Joint
Returns the joint’s parent, or None
for a root joint.
setParent(joint)
Sets the parent joint of this joint.
This can be None
if the joint is a root joint.
rotationOrder()
→ str
Returns the joint’s rotation order. See hou.ik.Joint.setRotationOrder.
setRotationOrder(rotate_order)
Sets the joint’s rotation order.
rotate_order
A string containing a permutation of the letters x
, y
, and z
that determines the order in which rotations are performed about
the coordinate axes.
rotationWeights()
→ hou.Vector3
Returns the weights for the joint’s rotation axes. See hou.ik.Joint.setRotationWeights.
setRotationWeights(weights)
Sets a hou.Vector3 specifying the weight of each rotation axis. Given a larger relative weight, the solution will tend to be achieved by rotating around that axis. A weight of zero will disable the rotation axis.
translationWeights()
→ hou.Vector3
Returns the weights for the joint’s translation axes. See hou.ik.Joint.setTranslationWeights.
setTranslationWeights(weights)
Sets a hou.Vector3 specifying the weight of each translation axis.
Given a larger relative weight, the solution will tend to be achieved by translating along that axis.
A weight of zero will disable the translation axis.
To set up an unpinned root joint, the root’s translation weight should be non-zero (e.g. hou.Vector3(1, 1, 1)
).
hasRotationLimits()
→ bool
Returns whether the joint has rotation limits.
rotationLimits()
→ (hou.Vector3, hou.Vector3)
Returns the lower and upper rotation limits (in radians) for the joint, relative to the rest transform.
If hou.ik.Joint.hasRotationLimits() is False
, (None, None)
is returned.
setRotationLimits(lower, upper)
Sets the lower and upper rotation limits (a hou.Vector3 in radians) for the joint.
translationLimits()
→ (hou.Vector3, hou.Vector3)
Returns the lower and upper translation limits for the joint, relative to the rest transform.
setTranslationLimits(lower, upper)
Sets the lower and upper translation limits for the joint.
hasTranslationLimits()
→ bool
Returns whether the joint has translation limits.
restTransform()
→ hou.Matrix4
Returns the joint’s rest pose, or None
if it has not been set.
setRestTransform(xform)
Sets a local space hou.Matrix4 specifying the joint’s rest pose. If not specified, the identity transform is used.
The solver will attempt to maintain this local transform based on the rest rotation weights and rest translation weights. This has a priority lower than any of the end effector targets.
Additionally, joint limits are enforced relative to this rest transform.
restRotationWeights()
→ hou.Vector3
Returns the rest weights for the joint’s rotation axes. See hou.ik.Joint.setRestRotationWeights.
setRestRotationWeights(weights)
Sets a hou.Vector3 specifying how strongly the solver attempts to match the rest transform for the rotation axes.
A value of 0.1 is typically a suitable value when enabling this behavior, and a value of 0 will disable the constraint.
The default value is {0,0,0}
.
restTranslationWeights()
→ hou.Vector3
Returns the rest weights for the joint’s translation axes. See hou.ik.Joint.setRestTranslationWeights.
setRestTranslationWeights(weights)
Sets a hou.Vector3 specifying how strongly the solver attempts to match the rest transform for the translation axes.
A value of 0.1 is typically a suitable value when enabling this behavior, and a value of 0 will disable the constraint.
The default value is {0,0,0}
.
mass()
→ float
Returns the mass of the body attached to this joint. See hou.ik.Joint.setMass.
setMass(mass)
Sets the mass of the body attached to this joint. This is only used by solvers that support center of mass targets, such as hou.ik.solvePhysFBIK().
localCenterOfMass()
→ hou.Vector3
Returns the local space position of the body attached to this joint. See hou.ik.Joint.setLocalCenterOfMass.
setLocalCenterOfMass(position)
Sets the local space position of the body attached to this joint.
A position of hou.Vector3(0, 0, 0)
will position the center of mass at the joint’s world space position.
This is only used by solvers that support center of mass targets, such as hou.ik.solvePhysFBIK().
See also |