pymel.core.rendering.orbit

orbit(*args, **kwargs)

The orbit command revolves the camera(s) horizontally and/or vertically in the perspective window. The rotation axis is with respect to the camera. To revolve horizontally: the rotation axis is the camera up direction vector. To revolve vertically: the rotation axis is the camera left direction vector. When both the horizontal and the vertical angles are supplied on the command line, the camera is firstly revolved horizontally, then revolved vertically. This command may be applied to more than one camera; objects that are not cameras are ignored. When no camera name supplied, this command is applied to all currently active cameras.

(<function orbit at 0x00000275622AEC88>, <function addCmdDocsCallback at 0x0000027561FEE278>, (‘orbit’, ‘’), {})

Flags:

Long Name / Short Name Argument Types Properties
horizontalAngle / ha float ../../../_images/create.gif
  Angle to revolve horizontally.
pivotPoint / pp float, float, float ../../../_images/create.gif
  Used as the pivot point in the world space.
rotationAngles / ra float, float ../../../_images/create.gif
  Angle to revolve horizontally and vertically.
verticalAngle / va float ../../../_images/create.gif
  Angle to revolve vertically. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.orbit

Example:

import pymel.core as pm

pm.camera()
# Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] #
pm.orbit( 'cameraShape1', ha=-30 )# Change the horizontal angle by -30 degrees

pm.orbit( 'cameraShape1', va=15 )# Change the vertical angle by 15 degrees

pm.orbit( 'cameraShape1', ra=(-30, 15) )# Change the horizontal angle by -30 degrees and the vertical angle by 15 degrees