Go to: Related nodes. Attributes.

This node implements a parentConstraint. Each constraint has a set of targets that are connected under the target attribute and a single constrained object that is connected to the constraint* attributes.

The parentConstraint node can have any number of target inputs. Each target is connected to attributes inside a single element of the target attribute. For example, the first target object would be connected elements of target[0], the second target object would be connected to elements of target[1], etc. The elements of each target are: targetTranslate, targetRotate, targetScale, targetRotatePivot, targetRotateTranslate, targetParentMatrix, targetRotateOrder, targetOffsetRotate, targetOffsetTranslate, and targetWeight.The elements of each target are normally connected to the target objects as follows:
parentConstraint attribute connected to
targetTranslate translate
targetRotate rotate
targetScale scale
targetRotateOrder rotateOrder
targetRotatePivot rotatePivot
targetRotateTranslate rotatePivotTranslate
targetParentMatrix parentMatrix[i]
targetOffsetTranslate set to constrained object's translational offset from target, in target's local space
targetOffsetRotate set to constrained object's rotational offset from target, in target's local space amd rotation order
targetWeight set to 1.0
The targetWeight attribute is not generally connected to the target object. Instead, it may be animated by other means to adjust the weighted average computation for the target parent. Similarly, targetOffsetTranslate and targetOffsetRotate are generally not connected to the target object, but rather a calculated to determine an appropriate offset from that target in the target's local space.For each target, the parentConstraint node uses these inputs to first rotate the constrained object to match that of the target, then computes the world space position of the pivot point of the target. It then computes a weighted average of the these transformations.The constrained object is connected to the constraint* attributes. The constraintRotatePivot, constraintRotateTranslate, constraintRotateOrder and constraintParentInverseMatrix are inputs to the pointConstraint. These values are used to determine counter-translations and -rotations which are used to compensate for any transformation induced by the constrained object's parent, changes to its rotate pivot, and so forth. The attributes constraintTranslate and constraintRotate are the only outputs.Although the all the constraint nodes inherit from transform, they do not actively use any of the attributes from transform.
Node name Parents MFn type Compatible function sets
parentConstraint constraint kParentConstraint kBase
kNamedObject
kDependencyNode
kDagNode
kTransform
kConstraint
kParentConstraint

Related nodes

parentConstraint, orientConstraint, scaleConstraint, poleVectorConstraint, geometryConstraint, tangentConstraint, normalConstraint, aimConstraint, lookAt

Attributes (76)

The following quick index only shows top-level attributes (too many attributes to show them all): constraintJointOrient (3), constraintParentInverseMatrix, constraintRotate (3), constraintRotateOrder, constraintRotatePivot (3), constraintRotateTranslate (3), constraintTranslate (3), interpCache, interpType, lastTargetRotate (3), restRotate (3), restTranslate (3), target (39)

Long name (short name) Type Default Flags
target (tg) compound n/a arrayoutputinputconnectablestorable
bundle of matrix, input position, and weight
targetParentMatrix (tpm) matrix identity outputinputconnectablestorable
input world position
targetWeight (tw) double 1.0 outputinputconnectablestorablekeyable
input weight for the position
targetRotateCached (ctr) double3 outputinputconnectable
Cached orientation. This attribute is used internally by the constraint and should not be modified by the user.
targetRotateCachedX (ctrx) angle (double) 0.0deg outputinputconnectable
cached X orientation
targetRotateCachedY (ctry) angle (double) 0.0deg outputinputconnectable
cached Y orientation
targetRotateCachedZ (ctrz) angle (double) 0.0deg outputinputconnectable
cached Z orientation
targetTranslate (tt) double3 outputinputconnectablestorable
input translation
targetTranslateX (ttx) distance (double) 0.0cm outputinputconnectablestorable
input X translation
targetTranslateY (tty) distance (double) 0.0cm outputinputconnectablestorable
input Y translation
targetTranslateZ (ttz) distance (double) 0.0cm outputinputconnectablestorable
input Z translation
targetRotatePivot (trp) double3 outputinputconnectablestorable
input rotate pivot
targetRotatePivotX (trpx) distance (double) 0.0cm outputinputconnectablestorable
input X rotate pivot
targetRotatePivotY (trpy) distance (double) 0.0cm outputinputconnectablestorable
input Y rotate pivot
targetRotatePivotZ (trpz) distance (double) 0.0cm outputinputconnectablestorable
input Z rotate pivot
targetRotateTranslate (trt) double3 outputinputconnectablestorable
input rotate pivot translate
targetRotateTranslateX (trtx) distance (double) 0.0cm outputinputconnectablestorable
input X rotate pivot translate
targetRotateTranslateY (trty) distance (double) 0.0cm outputinputconnectablestorable
input Y rotate pivot translate
targetRotateTranslateZ (trtz) distance (double) 0.0cm outputinputconnectablestorable
input Z rotate pivot translate
targetOffsetTranslate (tot) double3 outputinputconnectablestorable
Constrained object's translational offset from the target
targetOffsetTranslateX (totx) distance (double) 0.0cm outputinputconnectablestorablekeyable
Constrained object's x-translational offset from the target
targetOffsetTranslateY (toty) distance (double) 0.0cm outputinputconnectablestorablekeyable
Constrained object's y-translational offset from the target
targetOffsetTranslateZ (totz) distance (double) 0.0cm outputinputconnectablestorablekeyable
Constrained object's z-translational offset from the target
targetRotate (tr) double3 outputinputconnectablestorable
input orientation
targetRotateX (trx) angle (double) 0.0deg outputinputconnectablestorable
input X orientation
targetRotateY (try) angle (double) 0.0deg outputinputconnectablestorable
input Y orientation
targetRotateZ (trz) angle (double) 0.0deg outputinputconnectablestorable
input Z orientation
targetRotateOrder (tro) enum 0 outputinputconnectablestorable
Input target object rotate order value.
targetJointOrient (tjo) double3 outputinputconnectablestorable
input joint orientation
targetJointOrientX (tjox) angle (double) 0.0deg outputinputconnectablestorable
input X joint orientation
targetJointOrientY (tjoy) angle (double) 0.0deg outputinputconnectablestorable
input Y joint orientation
targetJointOrientZ (tjoz) angle (double) 0.0deg outputinputconnectablestorable
input Z joint orientation
targetOffsetRotate (tor) double3 outputinputconnectablestorable
Constrained object's rotational offset from the target
targetOffsetRotateX (torx) angle (double) 0.0deg outputinputconnectablestorablekeyable
Constrained object's x-rotational offset from the target
targetOffsetRotateY (tory) angle (double) 0.0deg outputinputconnectablestorablekeyable
Constrained object's y-rotational offset from the target
targetOffsetRotateZ (torz) angle (double) 0.0deg outputinputconnectablestorablekeyable
Constrained object's z-rotational offset from the target
targetScale (ts) double3 outputinputconnectablestorable
Target's scaling. Used to properly determine constraintTranslate from the given target.
targetScaleX (tsx) double 1.0 outputinputconnectablestorable
Target's x scaling.
targetScaleY (tsy) double 1.0 outputinputconnectablestorable
Target's y scaling.
targetScaleZ (tsz) double 1.0 outputinputconnectablestorable
Target's z scaling.
constraintParentInverseMatrix (cpim) matrix identity outputinputconnectablestorable
inverse of the parent matrix of the object
lastTargetRotate (lr) double3 outputinputconnectablestorable
Last computed orientation helps interpolator avoid flips
lastTargetRotateX (lrx) angle (double) 0.0deg outputinputconnectablestorable
X component of last computed orientation
lastTargetRotateY (lry) angle (double) 0.0deg outputinputconnectablestorable
Y component of last computed orientation
lastTargetRotateZ (lrz) angle (double) 0.0deg outputinputconnectablestorable
Z component of last computed orientation
constraintRotatePivot (crp) double3 outputinputconnectablestorable
object rotate pivot
constraintRotatePivotX (crpx) distance (double) 0.0cm outputinputconnectablestorable
object X rotate pivot
constraintRotatePivotY (crpy) distance (double) 0.0cm outputinputconnectablestorable
object Y rotate pivot
constraintRotatePivotZ (crpz) distance (double) 0.0cm outputinputconnectablestorable
object Z rotate pivot
constraintRotateTranslate (crt) double3 outputinputconnectablestorable
object rotate pivot translate
constraintRotateTranslateX (crtx) distance (double) 0.0cm outputinputconnectablestorable
object X rotate pivot translate
constraintRotateTranslateY (crty) distance (double) 0.0cm outputinputconnectablestorable
object Y rotate pivot translate
constraintRotateTranslateZ (crtz) distance (double) 0.0cm outputinputconnectablestorable
object Z rotate pivot translate
constraintTranslate (ct) double3 0.0, 0.0, 0.0 outputconnectable
output point position
constraintTranslateX (ctx) distance (double) 0.0cm outputconnectable
output X point position
constraintTranslateY (cty) distance (double) 0.0cm outputconnectable
output Y point position
constraintTranslateZ (ctz) distance (double) 0.0cm outputconnectable
output Z point position
restTranslate (rst) double3 0.0, 0.0, 0.0 outputinputconnectablestorable
rest translation
restTranslateX (rtx) distance (double) 0.0cm outputinputconnectablestorable
rest x translation
restTranslateY (rty) distance (double) 0.0cm outputinputconnectablestorable
rest y translation
restTranslateZ (rtz) distance (double) 0.0cm outputinputconnectablestorable
rest z translation
constraintRotateOrder (cro) enum 0 outputinputconnectablestorable
Input constrained object rotate order value.
constraintJointOrient (cjo) double3 outputinputconnectablestorable
Input constrained object joint orient value.
constraintJointOrientX (cjox) angle (double) 0.0deg outputinputconnectablestorable
Input constrained object joint orient X value.
constraintJointOrientY (cjoy) angle (double) 0.0deg outputinputconnectablestorable
Input constrained object joint orient Y value.
constraintJointOrientZ (cjoz) angle (double) 0.0deg outputinputconnectablestorable
Input constrained object joint orient Z value.
constraintRotate (cr) double3 outputconnectable
output orientation
constraintRotateX (crx) angle (double) 0.0deg outputconnectable
output X orientation
constraintRotateY (cry) angle (double) 0.0deg outputconnectable
output Y orientation
constraintRotateZ (crz) angle (double) 0.0deg outputconnectable
output Z orientation
restRotate (rsrr) double3 outputinputconnectablestorable
rest orientation
restRotateX (rrx) angle (double) 0.0deg outputinputconnectablestorable
rest X orientation
restRotateY (rry) angle (double) 0.0deg outputinputconnectablestorable
rest Y orientation
restRotateZ (rrz) angle (double) 0.0deg outputinputconnectablestorable
rest Z orientation
interpType (int) enum 1 outputinputconnectablestorablekeyable
Interpolation type, used when weighting between more than one target. When there is only one target, no interpolation is used and this attribute is ignored. The meaning of the types of interpolation is as follows:
  • No Flip When constraining between multiple targets, this attribute prevents flipping. Since this attribute is dependent on the previous frame, it requires a runup to provide consistent results, or a cache can be created using the Create Cache button in the parent constraint attribute editor.
  • Average The quaternion average. This setting can cause flipping since the previous result is not taken into consideration. Use the "No Flip" setting in order to prevent flipping.
  • Shortest Use the shortest path between the targets.
  • Longest Use the longest path between the targets.
  • Cache Use the cached result.
interpCache (inc) integer 0 outputinputconnectablestorable
This attribute controls the interpolation type when the interpType attribute is set to "cache". The cache is not usually necessary, except when the parent constraint is controlled by multiple targets and "no flip" interpType is used to prevent flipping. The "no flip" calculation is dependent on the previous frame, so a cache is required to consistently provide identical results on a given frame.