pymel.core.rendering.track¶
- track(*args, **kwargs)¶
The track command translates a camera horizontally or vertically in the world space. The viewing-direction and up- direction of the camera are not altered. There is no translation in the viewing direction. The track command can be applied to either a perspective or an orthographic camera. When no camera name is supplied, this command is applied to the camera in the active view.
(<function track at 0x191a4668>, <function addCmdDocsCallback at 0x1805b848>, (‘track’, ‘’), {})
Flags:
Long Name / Short Name Argument Types Properties down / d float Set the amount of down translation in unit distance. left / l float Set the amount of left translation in unit distance. right / r float Set the amount of right translation in unit distance. upDistance01 / u float Set the amount of up translation in unit distance. This is equivalent to using up/upDistance02 flag. upDistance02 / up float Set the amount of up translation in unit distance. This is equivalent to using u/upDistance01 flag. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.track
Example:
import pymel.core as pm pm.camera() # Result: [nt.Transform(u'camera1'), nt.Camera(u'cameraShape1')] # pm.track( 'cameraShape1', d=10 )# To track the camera down pm.track( 'cameraShape1', u=-10 ) pm.track( u=-10 )