Go to: Related nodes. Attributes.

This node implements a scaleConstraint. 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 scaleConstraint, there is no other information.

The scaleConstraint 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: targetScale, targetParentMatrix, and targetWeight.

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

scaleConstraint attribute connected to
targetScale scale
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 scale.

The scaleConstraint node uses these inputs to compute the world space scale factor of each target object. It then computes a weighted geometric average of the these scales. This weighted average is called the target scale.

The constrained object is connected to the constraint* attributes. For a scaleConstraint, the attribute constraintParentInverseMatrix is an input and the attribute constraintTranslate is the only output.

The scaleConstraint node computes an output scale value such that the world space scale factor of the constrained object matches the target scale.

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

Node nameParentsMFn typeCompatible function sets
scaleConstraintconstraintkScaleConstraintkBase
kNamedObject
kDependencyNode
kDagNode
kTransform
kConstraint
kScaleConstraint

Related nodes

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

Attributes (20)

constraintParentInverseMatrix, constraintScale, constraintScaleX, constraintScaleY, constraintScaleZ, offset, offsetX, offsetY, offsetZ, restScale, restScaleX, restScaleY, restScaleZ, target, targetParentMatrix, targetScale, targetScaleX, targetScaleY, targetScaleZ, targetWeight

Long name (short name)TypeDefaultFlags
target (tg) compoundn/aarrayoutputinputconnectablestorable
bundle of matrix, input position, and weight
targetScale (ts) double3outputinputconnectablestorable
input scale factor
targetScaleX (tsx) double1.0outputinputconnectablestorable
input X scale factor
targetScaleY (tsy) double1.0outputinputconnectablestorable
input Y scale factor
targetScaleZ (tsz) double1.0outputinputconnectablestorable
input Z scale factor
targetParentMatrix (tpm) matrixidentityoutputinputconnectablestorable
input world position
targetWeight (tw) double1.0outputinputconnectablestorablekeyable
input weight for the position
constraintParentInverseMatrix (cpim) matrixidentityoutputinputconnectablestorable
parent inverse matrix of the object
offset (o) double3outputinputconnectablestorablekeyable
object offset
offsetX (ox) double1.0outputinputconnectablestorablekeyable
object X offset
offsetY (oy) double1.0outputinputconnectablestorablekeyable
object Y offset
offsetZ (oz) double1.0outputinputconnectablestorablekeyable
object Z offset
constraintScale (cs) double3outputconnectable
output scale factor
constraintScaleX (csx) double1.0outputconnectable
output X scale factor
constraintScaleY (csy) double1.0outputconnectable
output Y scale factor
constraintScaleZ (csz) double1.0outputconnectable
output Z scale factor
restScale (rs) double3outputconnectable
Rest scale. When enableRestPosition is enabled, this is the output scale.
restScaleX (rsx) double1.0outputconnectable
rest X scale factor
restScaleY (rsy) double1.0outputconnectable
rest Y scale factor
restScaleZ (rsz) double1.0outputconnectable
rest Z scale factor