pymel.core.windows.autoPlace

static windows.autoPlace(*args, **kwargs)

This command takes a point in the centre of the current modeling pane and projects it onto the live surface. This produces a point in 3 space which is returned. If the um/useMouseflag is set the current mouse position is used rather than the centre of the modeling pane.

Flags:
Long name (short name) Argument Types Properties
useMouse (um) bool ../../../_images/create.gif
 

Use the current mouse position rather than the centre of the active view. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.autoPlace

Example:

import pymel.core as pm

#    Move the scene around a bit so the grid is no longer
#    centered in the view.
#
pm.track( right=10 )
pm.track( down=10 )

#    Create a sphere.
#
sphere = pm.sphere()

#    Reposition the sphere so that it is in the center of the
#    view.
#
position = pm.autoPlace()
pm.move( position[0], position[1], position[2], sphere[0], relative=True )

Previous topic

pymel.core.windows.autoLayout

Next topic

pymel.core.windows.blendShapeEditor

Core

Core Modules

Other Modules

This Page