Go to: Synopsis. Flags. Return value. Related. MEL examples.
geometryConstraint [-name string] [-remove] [-targetList] [-weight float] [-weightAliasList]
[target ...] object
geometryConstraint is undoable, queryable, and editable.
Constrain an object's position based on the shape of the target
surface(s) at the closest point(s) to the object.
A geometryConstraint takes as input one or more surface shapes (the
targets) and a DAG transform node (the object). The
geometryConstraint position constrained object such object lies on
the surface of the target with the greatest weight value. If two
targets have the same weight value then the one with the lowest index
is chosen.
name, remove, targetList, weight, weightAliasList
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
|
[string [] ] ( name of the created constraint node)
aimConstraint, normalConstraint, orientConstraint, parent, pointConstraint, poleVectorConstraint, scaleConstraint, tangentConstraint
// Constrain cube1 to surf1 at the closest point to cube1.
geometryConstraint surf1 cube1;
// Will prefer surf1 though the weights are equal
geometryConstraint -w .1 surf1 surf2 cube2;
// Now constraints cube2 to lie on surf2 as it's weight is greater
geometryConstraint -e -w 10. surf2 cube2;
// Removes surf2 from cube2's geometryConstraint.
geometryConstraint -e -rm surf2 cube2;
// Adds surf3 to cube2's geometryConstraint with the default weight.
geometryConstraint surf3 cube2;