Go to: Synopsis. Return value. Related. Flags. Python examples.
dolly(
[camera]
, [absolute=boolean], [distance=linear], [dollyTowardsCenter=boolean], [orthoScale=float], [relative=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
dolly is undoable, NOT queryable, and NOT editable.
The dolly command moves a camera along the viewing direction in the world space. The viewing-direction and up-direction of the camera are not altered. There are two modes of operation:
Relative mode: for a perspective camera, the camera is moved along its viewing direction, and the distance of travel is computed with respect to the current position of the camera in the world space. In relative mode, when the camera is moved, its COI is moved along with it, and is kept at the same distance, in front of the camera, as before applying the dolly operation. For orthographic camera, the viewing width of the camera is changed by scaling its ortho width by the new value specified on the command line.
Absolute mode: for a perspective camera, the camera is moved along its viewing direction, to the distance that is computed with respect to the current position of the world center of interest (COI) of the camera. In the absolute mode, when the camera is moved, the COI of the camera is not moved with the camera, but it is fixed at its current location in space. For orthographic camera, the viewing width of the camera is changed by replacing its ortho width with the new value specified on the command line. This command may be applied to more than one cameras; objects that are not cameras are ignored. When no camera name supplied on the command line, this command is applied to all currently active cameras.
The dolly command can be applied to either a perspective or an orthographic camera.
None
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
absolute(abs)
|
boolean
|
![]() |
||
|
||||
distance(d)
|
linear
|
![]() |
||
|
||||
dollyTowardsCenter(dtc)
|
boolean
|
![]() |
||
|
||||
orthoScale(os)
|
float
|
![]() |
||
|
||||
relative(rel)
|
boolean
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds cmds.camera() # Moves the persp camera forward through its center of interest cmds.dolly( 'persp', abs=True, d=-3 ) # Move the persp camera and its center of interest. cmds.dolly( 'persp', d=-3 ) # Changes the ortho-width of the top camera to 7.5 cmds.dolly( 'top', abs=True, os=7.5 ) # Scale the ortho-width of the top camera by a quarter from its current value. cmds.dolly( 'top', os=0.25 )