pymel.core.animation.scaleConstraint

scaleConstraint(*args, **kwargs)

Constrain an object’s scale to the scale of the target object or to the average scale of a number of targets. A scaleConstraint takes as input one or more targetDAG transform nodes to which to scale the single constraint objectDAG transform node. The scaleConstraint scales the constrained object at the weighted geometric mean of the world space target scale factors.

Maya Bug Fix:
  • when queried, upVector, worldUpVector, and aimVector returned the name of the constraint instead of the desired values
Modifications:
  • 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 =[] )
    
Flags:
  • layer : l (unicode) []

  • maintainOffset : mo (bool) [create]

    The offset necessary to preserve the constrained object’s initial scale will be calculated and used as the offset.

  • name : n (unicode) [create,query,edit]

    Sets the name of the constraint node to the specified name. Default name is constrainedObjectName_constraintType

  • offset : o (float, float, float) [create,query,edit]

    Sets or queries the value of the offset. Default is 1,1,1.

  • remove : rm (bool) [edit]

    removes the listed target(s) from the constraint.

  • skip : sk (unicode) [create,edit]

    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.

  • targetList : tl (bool) [query]

    Return the list of target objects.

  • weight : w (float) [create,query,edit]

    Sets the weight value for the specified target(s). If not given at creation time, the default value of 1.0 is used.

  • weightAliasList : wal (bool) [query]

    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.scaleConstraint

Previous topic

pymel.core.animation.rotationInterpolation

Next topic

pymel.core.animation.scaleKey

Core

Core Modules

Other Modules

This Page