Documentation - Maxscript

< Back to main maxscript documentation

Scale_Constraint : ScaleController


A Scale_Constraint causes an object's scale to follow the scale of an object or averaged scale of several objects.

An Scale Constrained object can be any type of object that inherits its scale from a target object. Once constrained you can not scale the object manually. You may move or rotate the object as long as its not constrained in a manner that affects the object's position or rotation controller.

The target object can be any type of object. The scale of a target object drives the constrained object. Targets can be animated using any of the standard translation, rotation, scale tools.

Properties

<Scale_Constraint>.relative Boolean default: false

Get/Set the keep initial offset parameter.

<Scale_Constraint>.local_world Integer default: 0

Get/Set the transform rule:

0 - Local.
1 - World.

Methods

<integer> <Scale_Constraint>.GetNumTargets()

Returns the number of target nodes in the target list.

<node> <Scale_Constraint>.GetNode <index>nodeNumber

Returns the indexed target node.

<float> <Scale_Constraint>.GetWeight <index>targetNumber

Returns the weight of the indexed target if the targetNumber is relevant, 0.0 otherwise.

<boolean> <Scale_Constraint>.SetWeight <index>targetNumber <float>weight

Sets the weight of the indexed node specified by targetNumber . Returns True on success, False otherwise.

<boolean> <Scale_Constraint>.AppendTarget <node>target <float>weight

Appends the specified node to the list and sets its weight to the specified value. Returns True on success, False otherwise.

<boolean> <Scale_Constraint>.DeleteTarget <index>targetNumber

Deletes the indexed target. Returns True on success, False otherwise.



< Back to main maxscript documentation