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 | |
|
| targetParentMatrix
(tpm )
| matrix | identity | | |
|
| targetWeight
(tw )
| double | 1.0 | | |
|
| targetRotateCached
(ctr )
| double3 | | | |
| targetRotateCachedX
(ctrx )
| angle (double) | 0.0deg | | |
| | targetRotateCachedY
(ctry )
| angle (double) | 0.0deg | | |
| | targetRotateCachedZ
(ctrz )
| angle (double) | 0.0deg | | |
|
|
| targetTranslate
(tt )
| double3 | | | |
| targetTranslateX
(ttx )
| distance (double) | 0.0cm | | |
| | targetTranslateY
(tty )
| distance (double) | 0.0cm | | |
| | targetTranslateZ
(ttz )
| distance (double) | 0.0cm | | |
|
|
| targetRotatePivot
(trp )
| double3 | | | |
| targetRotatePivotX
(trpx )
| distance (double) | 0.0cm | | |
| | targetRotatePivotY
(trpy )
| distance (double) | 0.0cm | | |
| | targetRotatePivotZ
(trpz )
| distance (double) | 0.0cm | | |
|
|
| targetRotateTranslate
(trt )
| double3 | | | |
| targetRotateTranslateX
(trtx )
| distance (double) | 0.0cm | | |
| | targetRotateTranslateY
(trty )
| distance (double) | 0.0cm | | |
| | targetRotateTranslateZ
(trtz )
| distance (double) | 0.0cm | | |
|
|
| targetOffsetTranslate
(tot )
| double3 | | | |
| targetOffsetTranslateX
(totx )
| distance (double) | 0.0cm | | |
| | targetOffsetTranslateY
(toty )
| distance (double) | 0.0cm | | |
| | targetOffsetTranslateZ
(totz )
| distance (double) | 0.0cm | | |
|
|
| targetRotate
(tr )
| double3 | | | |
| targetRotateX
(trx )
| angle (double) | 0.0deg | | |
| | targetRotateY
(try )
| angle (double) | 0.0deg | | |
| | targetRotateZ
(trz )
| angle (double) | 0.0deg | | |
|
|
| targetRotateOrder
(tro )
| enum | 0 | | |
|
| targetJointOrient
(tjo )
| double3 | | | |
| targetJointOrientX
(tjox )
| angle (double) | 0.0deg | | |
| | targetJointOrientY
(tjoy )
| angle (double) | 0.0deg | | |
| | targetJointOrientZ
(tjoz )
| angle (double) | 0.0deg | | |
|
|
| targetOffsetRotate
(tor )
| double3 | | | |
| targetOffsetRotateX
(torx )
| angle (double) | 0.0deg | | |
| | targetOffsetRotateY
(tory )
| angle (double) | 0.0deg | | |
| | targetOffsetRotateZ
(torz )
| angle (double) | 0.0deg | | |
|
|
| targetScale
(ts )
| double3 | | | |
| targetScaleX
(tsx )
| double | 1.0 | | |
| | targetScaleY
(tsy )
| double | 1.0 | | |
| | targetScaleZ
(tsz )
| double | 1.0 | | |
|
|
|
constraintParentInverseMatrix
(cpim )
| matrix | identity | |
|
|
lastTargetRotate
(lr )
| double3 | | |
|
| lastTargetRotateX
(lrx )
| angle (double) | 0.0deg | | |
|
| lastTargetRotateY
(lry )
| angle (double) | 0.0deg | | |
|
| lastTargetRotateZ
(lrz )
| angle (double) | 0.0deg | | |
|
|
constraintRotatePivot
(crp )
| double3 | | |
|
| constraintRotatePivotX
(crpx )
| distance (double) | 0.0cm | | |
|
| constraintRotatePivotY
(crpy )
| distance (double) | 0.0cm | | |
|
| constraintRotatePivotZ
(crpz )
| distance (double) | 0.0cm | | |
|
|
constraintRotateTranslate
(crt )
| double3 | | |
|
| constraintRotateTranslateX
(crtx )
| distance (double) | 0.0cm | | |
|
| constraintRotateTranslateY
(crty )
| distance (double) | 0.0cm | | |
|
| constraintRotateTranslateZ
(crtz )
| distance (double) | 0.0cm | | |
|
|
constraintTranslate
(ct )
| double3 | 0.0, 0.0, 0.0 | |
|
| constraintTranslateX
(ctx )
| distance (double) | 0.0cm | | |
|
| constraintTranslateY
(cty )
| distance (double) | 0.0cm | | |
|
| constraintTranslateZ
(ctz )
| distance (double) | 0.0cm | | |
|
|
restTranslate
(rst )
| double3 | 0.0, 0.0, 0.0 | |
|
| restTranslateX
(rtx )
| distance (double) | 0.0cm | | |
|
| restTranslateY
(rty )
| distance (double) | 0.0cm | | |
|
| restTranslateZ
(rtz )
| distance (double) | 0.0cm | | |
|
|
constraintRotateOrder
(cro )
| enum | 0 | |
|
|
constraintJointOrient
(cjo )
| double3 | | |
|
| constraintJointOrientX
(cjox )
| angle (double) | 0.0deg | | |
|
| constraintJointOrientY
(cjoy )
| angle (double) | 0.0deg | | |
|
| constraintJointOrientZ
(cjoz )
| angle (double) | 0.0deg | | |
|
|
constraintRotate
(cr )
| double3 | | |
|
| constraintRotateX
(crx )
| angle (double) | 0.0deg | | |
|
| constraintRotateY
(cry )
| angle (double) | 0.0deg | | |
|
| constraintRotateZ
(crz )
| angle (double) | 0.0deg | | |
|
|
restRotate
(rsrr )
| double3 | | |
|
| restRotateX
(rrx )
| angle (double) | 0.0deg | | |
|
| restRotateY
(rry )
| angle (double) | 0.0deg | | |
|
| restRotateZ
(rrz )
| angle (double) | 0.0deg | | |
|
|
interpType
(int )
| enum | 1 | |
|
|
interpCache
(inc )
| integer | 0 | |
|