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 targetDAG transform nodes at which to position the single constraint objectDAG transform node. The pointOnPolyConstraint positions the constrained object at the weighted average of the world space position target objects.
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 =[] )
layer : l (unicode) []
The offset necessary to preserve the constrained object’s initial position will be calculated and used as the offset.
Sets the name of the constraint node to the specified name. Default name is constrainedObjectName_constraintType
Sets or queries the value of the offset. Default is 0,0,0.
removes the listed target(s) from the constraint.
Specify the axis to be skipped. Valid values are x, y, zand none. During creation, noneis the default. This flag is multi-use. Flag can have multiple arguments, passed either as a tuple or a list.
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
Derived from mel command maya.cmds.pointOnPolyConstraint