Go to: Synopsis. Return value. Related.
Flags. MEL
examples.
pointOnPolyConstraint [-layer string] [-maintainOffset] [-name string] [-offset float float float] [-remove] [-skip
string] [-targetList]
[-weight float] [-weightAliasList] [target...]
[object]
pointOnPolyConstraint is undoable, queryable, and editable.
Constrain an object's position to the position of the target object
or to the average position of a number of targets. A
pointOnPolyConstraint takes as input one or more "target" DAG
transform nodes at which to position the single "constraint object"
DAG transform node. The pointOnPolyConstraint positions the
constrained object at the weighted average of the world space
position target objects.
string[] |
Name of the created constraint node |
In query mode, return type is based on queried flag.
aimConstraint, geometryConstraint, normalConstraint, orientConstraint, parentConstraint, poleVectorConstraint, scaleConstraint, tangentConstraint
layer, maintainOffset, name, offset, remove, skip, targetList, weight,
weightAliasList
Long name (short name) |
Argument types |
Properties |
-name(-n) |
string |
|
|
Sets the name of the constraint node to the specified name.
Default name is constrainedObjectName_constraintType |
|
-weight(-w) |
float |
|
|
Sets the weight value for the specified target(s). If not given
at creation time, the default value of 1.0 is used. |
|
-remove(-rm) |
|
|
|
removes the listed target(s) from the constraint. |
|
-targetList(-tl) |
|
|
|
Return the list of target objects. |
|
-weightAliasList(-wal) |
|
|
|
Returns the names of the attributes that control the weight of
the target objects. Aliases are returned in the same order as the
targets are returned by the targetList flag |
|
-layer(-l) |
string |
|
|
Specify the name of the animation layer where the constraint
should be added. |
|
-offset(-o) |
float float float |
|
|
Sets or queries the value of the offset. Default is 0,0,0. |
|
-maintainOffset(-mo) |
|
|
|
The offset necessary to preserve the constrained object's
initial position will be calculated and used as the offset. |
|
-skip(-sk) |
string |
|
|
Specify the axis to be skipped. Valid values are "x", "y", "z"
and "none". During creation, "none" is the default. This flag is
multi-use. |
|
Flag can appear in Create mode of
command |
Flag can appear in Edit mode of command |
Flag can appear in Query mode of command |
Flag can be used more than once in a
command. |
// Position cube1 at the location of cone1.
pointOnPolyConstraint cone1 cube1;
// Uses the average of the position of cone1 and surf2.
pointOnPolyConstraint -w .1 cone1 surf2 cube2;
// Sets the weight for cone1's effect on cube2 to 10.
pointOnPolyConstraint -e -w 10. cone1 cube2;
// Removes surf2 from cube2's pointOnPolyConstraint
pointOnPolyConstraint -e -rm surf2 cube2;
// Adds surf3 to cube2's pointOnPolyConstraint with the default weight
pointOnPolyConstraint surf3 cube2;
// Constrain the y & z translation of sph2 to sph1
pointOnPolyConstraint -skip x sph1 sph2;