Go to: Related nodes. Attributes.

This node implements an orientConstraint. Each constraint has a set of targets that are connected under the target attribute, a single constrained object that is connected to the constraint* attributes, and possibly other information to help compute the correct results. In the case of the orientConstraint, there is no other information.

The orientConstraint 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: targetRotate, targetRotateOrder, targetParentMatrix, and targetWeight.

The elements of each target are normally connected to the target objects as follows:

orientConstraint attribute connected to
targetRotate rotate
targetRotateOrder rotateOrder
targetJointOrient jointOrient (joints only)
targetParentMatrix parentMatrix[i]
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 orientation.

The orientConstraint node uses these inputs to compute the world space orientation of each target object. It then computes a weighted average of the these orientations in quaternion space. This weighted average is called the target orientation.

The constrained object is connected to the constraint* attributes. For an orientConstraint, the attributes constraintRotateOrder, constraintJointOrient, and constraintParentInverseMatrix are inputs to the orientConstraint. The attribute constraintRotate is the only output.

The orientConstraint node computes an output rotation value such that the orientation of the constrained object matches the target orientation.

Although the all the constraint nodes inherit from transform, they do not actively use any of the attributes from transform.

Node nameParentsClassificationMFn typeCompatible function sets

Related nodes

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

Attributes (46)

constraintJointOrient, constraintJointOrientX, constraintJointOrientY, constraintJointOrientZ, constraintParentInverseMatrix, constraintRotate, constraintRotateOrder, constraintRotateX, constraintRotateY, constraintRotateZ, interpCache, interpType, inverseScale, inverseScaleX, inverseScaleY, inverseScaleZ, lastTargetRotate, lastTargetRotateX, lastTargetRotateY, lastTargetRotateZ, offset, offsetX, offsetY, offsetZ, restRotate, restRotateX, restRotateY, restRotateZ, scaleCompensate, target, targetJointOrient, targetJointOrientX, targetJointOrientY, targetJointOrientZ, targetParentMatrix, targetRotate, targetRotateCached, targetRotateCachedX, targetRotateCachedY, targetRotateCachedZ, targetRotateOrder, targetRotateX, targetRotateY, targetRotateZ, targetWeight, useOldOffsetCalculation

Long name (short name)TypeDefaultFlags
target (tg) compoundn/aarrayoutputinputconnectablestorable
bundle of matrix, input position, and weight
targetRotate (tr) double3outputinputconnectablestorable
input orientation
targetRotateX (trx) angle (double)0.0degoutputinputconnectablestorable
input X orientation
targetRotateY (try) angle (double)0.0degoutputinputconnectablestorable
input Y orientation
targetRotateZ (trz) angle (double)0.0degoutputinputconnectablestorable
input Z orientation
targetRotateOrder (tro) enum0outputinputconnectablestorable
Input target object rotate order value.
targetJointOrient (tjo) double3outputinputconnectablestorable
input joint orientation
targetJointOrientX (tjox) angle (double)0.0degoutputinputconnectablestorable
input X joint orientation
targetJointOrientY (tjoy) angle (double)0.0degoutputinputconnectablestorable
input Y joint orientation
targetJointOrientZ (tjoz) angle (double)0.0degoutputinputconnectablestorable
input Z joint orientation
targetParentMatrix (tpm) matrixidentityoutputinputconnectablestorable
input world position
targetWeight (tw) double1.0outputinputconnectablestorablekeyable
input weight for the position
targetRotateCached (ctr) double3outputinputconnectable
Cached orientation. This attribute is used internally by the constraint and should not be modified by the user.
targetRotateCachedX (ctrx) angle (double)0.0degoutputinputconnectable
cached X orientation
targetRotateCachedY (ctry) angle (double)0.0degoutputinputconnectable
cached Y orientation
targetRotateCachedZ (ctrz) angle (double)0.0degoutputinputconnectable
cached Z orientation
lastTargetRotate (lr) double3outputinputconnectablestorable
Last computed orientation, helps interpolator avoid flips
lastTargetRotateX (lrx) angle (double)0.0degoutputinputconnectablestorable
X component of last computed orientation
lastTargetRotateY (lry) angle (double)0.0degoutputinputconnectablestorable
Y component of last computed orientation
lastTargetRotateZ (lrz) angle (double)0.0degoutputinputconnectablestorable
Z component of last computed orientation
constraintParentInverseMatrix (cpim) matrixidentityoutputinputconnectablestorable
parent inverse matrix of the object
constraintRotateOrder (cro) enum0outputinputconnectablestorable
Input constrained object rotate order value.
constraintJointOrient (cjo) double3outputinputconnectablestorable
Input constrained object joint orient value.
constraintJointOrientX (cjox) angle (double)0.0degoutputinputconnectablestorable
Input constrained object joint orient X value.
constraintJointOrientY (cjoy) angle (double)0.0degoutputinputconnectablestorable
Input constrained object joint orient Y value.
constraintJointOrientZ (cjoz) angle (double)0.0degoutputinputconnectablestorable
Input constrained object joint orient Z value.
scaleCompensate (ssc) booltrueoutputinputconnectablestorable
Indicates whether to compensate for the scale of the parent joint.
inverseScale (is) double3outputinputconnectablestorable
Input constrained object scale of the parent joint.
inverseScaleX (isx) double1.0outputinputconnectablestorable
X component of aParentScale.
inverseScaleY (isy) double1.0outputinputconnectablestorable
Y component of aParentScale.
inverseScaleZ (isz) double1.0outputinputconnectablestorable
Z component of aParentScale.
constraintRotate (cr) double3outputconnectable
output orientation
constraintRotateX (crx) angle (double)0.0degoutputconnectable
output X orientation
constraintRotateY (cry) angle (double)0.0degoutputconnectable
output Y orientation
constraintRotateZ (crz) angle (double)0.0degoutputconnectable
output Z orientation
offset (o) double3outputinputconnectablestorable
object offset
offsetX (ox) angle (double)0.0degoutputinputconnectablestorablekeyable
object X offset
offsetY (oy) angle (double)0.0degoutputinputconnectablestorablekeyable
object Y offset
offsetZ (oz) angle (double)0.0degoutputinputconnectablestorablekeyable
object Z offset
restRotate (rsrr) double3outputinputconnectablestorable
rest orientation
restRotateX (rrx) angle (double)0.0degoutputinputconnectablestorable
rest X orientation
restRotateY (rry) angle (double)0.0degoutputinputconnectablestorable
rest Y orientation
restRotateZ (rrz) angle (double)0.0degoutputinputconnectablestorable
rest Z orientation
interpType (int) enum1outputinputconnectablestorablekeyable
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 orient 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) integer0outputinputconnectablestorable
This attribute controls the interpolation type when the interpType attribute is set to "cache". The cache is not usually necessary, except when the orient 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.
useOldOffsetCalculation (uooc) boolfalseoutputinputconnectablestorable
Turning this on switches the offset calculation from computing an offset rotation matrix, to simply adding the individual offset values to the x, y, and z rotation value computed by the constraint.