pymel.core.modeling.manipPivot¶
- manipPivot(*args, **kwargs)¶
Changes transform component pivot used by the move/rotate/scale manipulators. In query mode, return type is based on queried flag.
Flags:
Long Name / Short Name Argument Types Properties moveToolOri / mto int Change move tool’s axis orientation to the specified mode. This flag is the same as using manipMoveContext -e -modeon the Move tool except that this command is undoable. ori / o float, float, float Component pivot orientation in world-space. oriValid / ov bool Returns true if component pivot orientation is valid. orientation / o float, float, float pinPivot / pin bool Pin component pivot. Selection changes will not reset the pivot position/orientation when a custom pivot is set and pinning is on. pos / p float, float, float Component pivot position in world-space. posValid / pv bool Returns true if component pivot position is valid. position / p float, float, float reset / r bool Clear the saved component pivot position and orientation. resetOri / ro bool Clear the saved component pivot orientation. resetPos / rp bool Clear the saved component pivot position. rotateToolOri / rto int Change rotate tool’s axis orientation to the specified mode. This flag is the same as using manipRotateContext -e -modeon the Rotate tool except that this command is undoable. scaleToolOri / sto int Change scale tool’s axis orientation to the specified mode. This flag is the same as using manipScaleContext -e -modeon the Scale tool except that this command is undoable. snapOri / so bool Snap pivot orientation. Modify pivot orientation when snapping the pivot to a component. snapPos / sp bool Snap pivot position. Modify pivot position when snapping the pivot to a component. valid / v bool Returns true if component pivot position or orientation is valid. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.manipPivot
Example:
- ::
import pymel.core as pm
// Set tool component pivot to “1,0,0” pm.manipPivot( p=(1, 0, 0) )