pymel.core.animation.shot

shot(*args, **kwargs)

Use this command to create a shot node or manipulate that node.

Flags:
Long name (short name) Argument Types Properties
audio (aud) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Specify the audio clip for this shot. Audio can be linked to a shot to allow playback of specific sounds when that shot is being displayed in the Sequencer. Refer to the shot node’s documentation for details on how audio is used by shots and the Sequencer.

clip (cl) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

The clip associated with this shot. This clip will be posted to the currentCamera’s imagePlane. Refer to the shot node’s documentation for details on how cameras are used by shots and the Sequencer.

clipDuration (cd) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Length of clip. This is used for the display of the clip indicator bar in the Sequencer.
clipOpacity (co) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Opacity for the shot’s clip, this value is assigned to the currentCamera’s imagePlane. Refer to the shot node’s documentation for details on how cameras are used by shots and the Sequencer.

clipSyncState (css) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

The viewport synchronization status of the clip associated with this shot. Return values are, 0 = no clip associated with this shot 1 = clip is fully in sync with viewport, and frames are 1:1 with sequencer 2 = clip is partially in sync with viewport, movie may be scaled to match sequencer 3 = clip not in sync with viewport (i.e. could have scale/time/camera differences)

clipZeroOffset (czo) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specify which time of the clip corresponds to the beginning of the shot. This is used to properly align splitted clips.
copy (c) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag is used to copy a shot to the clipboard. In query mode, this flag allows you to query what, if anything, has been copied into the shot clipboard.
currentCamera (cc) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
The camera associated with this shot. Refer to the shot node’s documentation for details on how cameras are used by shots and the Sequencer.
determineTrack (dt) bool ../../../_images/query.gif ../../../_images/edit.gif
 

Determines an available track for the shot. Returns a new track number or the existing track number if the current track is available.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

endTime (et) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
The shot end time in the Maya timeline. Changing the startTime will extend the duration of a shot.
favorite (fav) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Make the shot a favorite. This is a UI indicator only to streamline navigation in the Sequencer panel
linkAudio (la) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specify an audio clip to link to this shot. Any currently linked audio will be unlinked.
lock (lck) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Lock a specific shot. This is different than locking an entire track, which is done via the shotTrack command
mute (m) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Mute a specific shot. This is different than muting an entire track, which is done via the shotTrack command
paste (p) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag is used to paste a shot or shots from the clipboard to the sequence timeline. Shots are added to the clipboard using the c/copy flag.
pasteInstance (pi) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

This flag is used to paste an instance of a shot or shots from the clipboard to the sequence timeline. Unlike the p/paste flag, which duplicates the camera and image plane from the original source shot, the pi/pasteInstance flag shares the camera and image plane from the source shot. The audio node is duplicated.

postHoldTime (pst) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specify the time length to append to the shot in the sequence timeline. This repeats the last frame of the shot, in sequence time, over the specified duration.
preHoldTime (prt) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specify the time length to prepend to the shot in the sequence timeline. This repeats the first frame of the shot, in sequence time, over the specified duration.
scale (s) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specify an amount to scale the Maya frame range of the shot. This will affect the sequenceEndFrame, leaving the sequenceStartFrame unchanged.
sequenceDuration (sqd) time ../../../_images/query.gif ../../../_images/edit.gif
 
Return the sequence duration of the shot, which will include the holds and scale. This flag can only be queried.
sequenceEndTime (set) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
The shot end in the sequence timeline. Changing the endTime of a shot will scale it in sequence time.
sequenceStartTime (sst) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
The shot start in the sequence timeline. Changing the startTime of a shot will shift it in sequence time.
shotName (sn) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Specify a user-defined name for this shot. This allows the assignment of names that are not valid as node names within Maya. Whenever the shotName attribute is defined its value is used in the UI.

sourceDuration (sd) time ../../../_images/query.gif ../../../_images/edit.gif
 
Return the number of source frames in the shot. This flag can only be queried.
startTime (st) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
The shot start time in the Maya timeline. Changing the startTime will extend the duration of a shot.
track (trk) int ../../../_images/query.gif ../../../_images/edit.gif
 
Specify the track in which this shot resides.
unlinkAudio (ula) bool ../../../_images/query.gif ../../../_images/edit.gif
 
COMMENT Unlinks any currently linked audio.

Derived from mel command maya.cmds.shot

Example:

import pymel.core as pm

import maya.cmds as cmds

myShot = pm.shot('myShot', st=10, et=19);
pm.shot(myShot, e=True, sst=100, set=119);
pm.shot(myShot, q=True, st=True);
pm.shot(myShot, q=True, sst=True);
pm.shot(myShot, e=True, pst=10);
pm.shot(myShot, q=True, set=True);
pm.shot(myShot, e=True, prt=5);
pm.shot(myShot, q=True, set=True);
pm.shot(myShot, q=True, sd=True);