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 name Parents MFn type Compatible function sets
scaleConstraint constraint kScaleConstraint kBase
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) Type Default Flags
target (tg) compound n/a arrayoutputinputconnectablestorable
bundle of matrix, input position, and weight
targetScale (ts) double3 outputinputconnectablestorable
input scale factor
targetScaleX (tsx) double 1.0 outputinputconnectablestorable
input X scale factor
targetScaleY (tsy) double 1.0 outputinputconnectablestorable
input Y scale factor
targetScaleZ (tsz) double 1.0 outputinputconnectablestorable
input Z scale factor
targetParentMatrix (tpm) matrix identity outputinputconnectablestorable
input world position
targetWeight (tw) double 1.0 outputinputconnectablestorablekeyable
input weight for the position
constraintParentInverseMatrix (cpim) matrix identity outputinputconnectablestorable
parent inverse matrix of the object
offset (o) double3 outputinputconnectablestorablekeyable
object offset
offsetX (ox) double 1.0 outputinputconnectablestorablekeyable
object X offset
offsetY (oy) double 1.0 outputinputconnectablestorablekeyable
object Y offset
offsetZ (oz) double 1.0 outputinputconnectablestorablekeyable
object Z offset
constraintScale (cs) double3 outputconnectable
output scale factor
constraintScaleX (csx) double 1.0 outputconnectable
output X scale factor
constraintScaleY (csy) double 1.0 outputconnectable
output Y scale factor
constraintScaleZ (csz) double 1.0 outputconnectable
output Z scale factor
restScale (rs) double3 outputconnectable
Rest scale. When enableRestPosition is enabled, this is the output scale.
restScaleX (rsx) double 1.0 outputconnectable
rest X scale factor
restScaleY (rsy) double 1.0 outputconnectable
rest Y scale factor
restScaleZ (rsz) double 1.0 outputconnectable
rest Z scale factor