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.
added new syntax for querying the weight of a target object, by passing the constraint first:
aimConstraint( 'pCube1_aimConstraint1', q=1, weight ='pSphere1' )
aimConstraint( 'pCube1_aimConstraint1', q=1, weight =['pSphere1', 'pCylinder1'] )
aimConstraint( 'pCube1_aimConstraint1', q=1, weight =[] )
Sets the name of the constraint node to the specified name. Default name is constrainedObjectName_constraintType
removes the listed target(s) from the constraint.
Return the list of target objects.
Sets the weight value for the specified target(s). If not given at creation time, the default value of 1.0 is used.
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 Flag can have multiple arguments, passed either as a tuple or a list.
Derived from mel command maya.cmds.geometryConstraint