Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

shot [-audio string] [-clip string] [-clipDuration time] [-clipOpacity float] [-clipSyncState] [-clipZeroOffset time] [-copy] [-currentCamera string] [-determineTrack] [-endTime time] [-favorite boolean] [-linkAudio string] [-lock boolean] [-mute boolean] [-paste] [-pasteInstance] [-postHoldTime time] [-preHoldTime time] [-scale float] [-sequenceDuration time] [-sequenceEndTime time] [-sequenceStartTime time] [-shotName string] [-sourceDuration time] [-startTime time] [-track int] [-unlinkAudio]

shot is undoable, queryable, and editable.

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

Return value

string Shot name

In query mode, return type is based on queried flag.

Keywords

reference, sequencer, node

Flags

audio, clip, clipDuration, clipOpacity, clipSyncState, clipZeroOffset, copy, currentCamera, determineTrack, endTime, favorite, linkAudio, lock, mute, paste, pasteInstance, postHoldTime, preHoldTime, scale, sequenceDuration, sequenceEndTime, sequenceStartTime, shotName, sourceDuration, startTime, track, unlinkAudio
Long name (short name) Argument types Properties
-startTime(-st) time createqueryedit
The shot start time in the Maya timeline. Changing the startTime will extend the duration of a shot.
-endTime(-et) time createqueryedit
The shot end time in the Maya timeline. Changing the startTime will extend the duration of a shot.
-sequenceStartTime(-sst) time createqueryedit
The shot start in the sequence timeline. Changing the startTime of a shot will shift it in sequence time.
-sequenceEndTime(-set) time createqueryedit
The shot end in the sequence timeline. Changing the endTime of a shot will scale it in sequence time.
-preHoldTime(-prt) time createqueryedit
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.
-postHoldTime(-pst) time createqueryedit
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.
-scale(-s) float createqueryedit
Specify an amount to scale the Maya frame range of the shot. This will affect the sequenceEndFrame, leaving the sequenceStartFrame unchanged.
-sourceDuration(-sd) time queryedit
Return the number of source frames in the shot. This flag can only be queried.
-sequenceDuration(-sqd) time queryedit
Return the sequence duration of the shot, which will include the holds and scale. This flag can only be queried.
-currentCamera(-cc) string createqueryedit
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.
-track(-trk) int queryedit
Specify the track in which this shot resides.
-clip(-cl) string createqueryedit
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.
-clipOpacity(-co) float createqueryedit
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.
-clipDuration(-cd) time createqueryedit
Length of clip. This is used for the display of the clip indicator bar in the Sequencer.
-clipZeroOffset(-czo) time createqueryedit
Specify which time of the clip corresponds to the beginning of the shot. This is used to properly align splitted clips.
-clipSyncState(-css) createqueryedit
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)
-audio(-aud) string createqueryedit
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.
-favorite(-fav) boolean createqueryedit
Make the shot a favorite. This is a UI indicator only to streamline navigation in the Sequencer panel
-lock(-lck) boolean createqueryedit
Lock a specific shot. This is different than locking an entire track, which is done via the shotTrack command
-mute(-m) boolean createqueryedit
Mute a specific shot. This is different than muting an entire track, which is done via the shotTrack command
-shotName(-sn) string createqueryedit
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.
-copy(-c) createqueryedit
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.
-paste(-p) createqueryedit
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) createqueryedit
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.
-linkAudio(-la) string createqueryedit
Specify an audio clip to link to this shot. Any currently linked audio will be unlinked.
-unlinkAudio(-ula) queryedit
COMMENT Unlinks any currently linked audio.
-determineTrack(-dt) queryedit
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 command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// Create a shot, modify it's length, and add some holds
string $shot = `shot myShot`;
shot -e -startTime 10 -endTime 19 $shot;
shot -e -sequenceStartTime 100 -sequenceEndTime -109 $shot;
shot -q -startTime $shot;
// Result: 10 //
shot -q -sequenceStartTime $shot;
// Result: 100 //
shot -e -postHoldTime 10 $shot;
shot -q -sequenceEndTime $shot;
// Result: 119 //
shot -e -preHoldTime 5 $shot;
shot -q -sequenceEndTime $shot;
// Result: 124 //
shot -q -sequenceDuration $shot
// Result: 25 //