pymel.core.rendering.roll

static rendering.roll(*args, **kwargs)

The roll command rotates a camera about its viewing direction, a positive angle produces clockwise camera rotation, while a negative angle produces counter-clockwise camera rotation. The default mode is relative and the rotation is applied with respect to the current orientation of the camera. When mode is set to absolute, the rotation is applied with respect to the plane constructed from the following three vectors in the world space: the world up vector, the camera view vector, and the camera up vector. The rotation angle is specified in degrees. The roll command can be applied to either a perspective or an orthographic camera. 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.

Flags:
Long name (short name) Argument Types Properties
absolute (abs) bool ../../../_images/create.gif
 
Set to absolute mode.
degree (d) float ../../../_images/create.gif
 
Set the amount of the rotation angle. Flag can have multiple arguments, passed either as a tuple or a list.
relative (rel) bool ../../../_images/create.gif
 
Set to relative mode.

Derived from mel command maya.cmds.roll

Example:

import pymel.core as pm

pm.camera()
# Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] #

# Align the horizontal direction with the world horizon
pm.roll( 'cameraShape1', abs=True, d=0 )

# Roll the camera 15 degrees clockwise
pm.roll( 'cameraShape1', d=15 )

pm.roll( d=15 )

Previous topic

pymel.core.rendering.resolutionNode

Next topic

pymel.core.rendering.sampleImage

Core

Core Modules

Other Modules

This Page