Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.

Synopsis

shot([audio=string], [clip=string], [clipDuration=time], [clipOpacity=float], [clipSyncState=boolean], [clipZeroOffset=time], [copy=boolean], [createCustomAnim=boolean], [currentCamera=string], [customAnim=boolean], [deleteCustomAnim=boolean], [determineTrack=boolean], [endTime=time], [favorite=boolean], [flag1=boolean], [flag10=boolean], [flag11=boolean], [flag12=boolean], [flag2=boolean], [flag3=boolean], [flag4=boolean], [flag5=boolean], [flag6=boolean], [flag7=boolean], [flag8=boolean], [flag9=boolean], [hasCameraSet=boolean], [hasStereoCamera=boolean], [linkAudio=string], [lock=boolean], [mute=boolean], [paste=boolean], [pasteInstance=boolean], [postHoldTime=time], [preHoldTime=time], [scale=float], [selfmute=boolean], [sequenceDuration=time], [sequenceEndTime=time], [sequenceStartTime=time], [shotName=string], [sourceDuration=time], [startTime=time], [track=int], [transitionInLength=time], [transitionInType=int], [transitionOutLength=time], [transitionOutType=int], [unlinkAudio=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

shot is undoable, queryable, and editable.

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

Return value

stringShot name

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

Keywords

reference, sequencer, node

Related

shotTrack

Flags

audio, clip, clipDuration, clipOpacity, clipSyncState, clipZeroOffset, copy, createCustomAnim, currentCamera, customAnim, deleteCustomAnim, determineTrack, endTime, favorite, flag1, flag10, flag11, flag12, flag2, flag3, flag4, flag5, flag6, flag7, flag8, flag9, hasCameraSet, hasStereoCamera, linkAudio, lock, mute, paste, pasteInstance, postHoldTime, preHoldTime, scale, selfmute, sequenceDuration, sequenceEndTime, sequenceStartTime, shotName, sourceDuration, startTime, track, transitionInLength, transitionInType, transitionOutLength, transitionOutType, unlinkAudio
Long name (short name) Argument types Properties
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.
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.
clipDuration(cd) time createqueryedit
Length of clip. This is used for the display of the clip indicator bar in 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.
clipSyncState(css) boolean 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)
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.
copy(c) boolean 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.
createCustomAnim(cca) boolean edit
Creates an animation layer and links the shot node's customAnim attr to the weight attr of the animation layer
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.
customAnim(ca) boolean query
Returns the name of the animation layer node linked to this shot node's customAnim attr
deleteCustomAnim(dca) boolean edit
Disconnects the animation layer from this shot's customAnim attr and deletes the animation layer node
determineTrack(dt) boolean queryedit
Determines an available track for the shot. Returns a new track number or the existing track number if the current track is available.
endTime(et) time createqueryedit
The shot end time in the Maya timeline. Changing the startTime will extend the duration of a shot.
favorite(fav) boolean createqueryedit
Make the shot a favorite. This is a UI indicator only to streamline navigation in the Sequencer panel
flag1(f1) boolean createqueryedit
User specified state flag 1/12 for this shot
flag10(f10) boolean createqueryedit
User specified state flag 10/12 for this shot
flag11(f11) boolean createqueryedit
User specified state flag 11/12 for this shot
flag12(f12) boolean createqueryedit
User specified state flag 12/12 for this shot
flag2(f2) boolean createqueryedit
User specified state flag 2/12 for this shot
flag3(f3) boolean createqueryedit
User specified state flag 3/12 for this shot
flag4(f4) boolean createqueryedit
User specified state flag 4/12 for this shot
flag5(f5) boolean createqueryedit
User specified state flag 5/12 for this shot
flag6(f6) boolean createqueryedit
User specified state flag 6/12 for this shot
flag7(f7) boolean createqueryedit
User specified state flag 7/12 for this shot
flag8(f8) boolean createqueryedit
User specified state flag 8/12 for this shot
flag9(f9) boolean createqueryedit
User specified state flag 9/12 for this shot
hasCameraSet(hcs) boolean createqueryedit
Returns true if the camera associated with this shot is a camera set.
hasStereoCamera(hsc) boolean createqueryedit
Returns true if the camera associated with this shot is a stereo camera.
linkAudio(la) string createqueryedit
Specify an audio clip to link to this shot. Any currently linked audio will be unlinked.
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. Querying this attribute will return true if the shot is muted due to its own mute, its shot being muted, or its shot being unsoloed. See flag "selfmute" to query only the shot's own state.
paste(p) boolean 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) boolean 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.
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.
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.
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.
selfmute(sm) boolean createqueryedit
Query if this individual shot's own mute state is set. This is different from the flag "mute", which will return true if this shot is muted due to the track being muted or another track being soloed. Editing this flag will set this shot's own mute status (identical behavior as the flag "mute").
sequenceDuration(sqd) time queryedit
Return the sequence duration of the shot, which will include the holds and scale. This flag can only be queried.
sequenceEndTime(set) time createqueryedit
The shot end in the sequence timeline. Changing the endTime of a shot will scale it in sequence time.
sequenceStartTime(sst) time createqueryedit
The shot start in the sequence timeline. Changing the startTime of a shot will shift it in sequence time.
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.
sourceDuration(sd) time queryedit
Return the number of source frames in the shot. This flag can only be queried.
startTime(st) time createqueryedit
The shot start time in the Maya timeline. Changing the startTime will extend the duration of a shot.
track(trk) int queryedit
Specify the track in which this shot resides.
transitionInLength(til) time createqueryedit
Length of the transtion into the shot.
transitionInType(tit) int queryedit
Specify the the type of transition for the transition into the shot. 0 = Fade 1 = Dissolve
transitionOutLength(tol) time createqueryedit
Length of the transtion out of the shot.
transitionOutType(tot) int queryedit
Specify the the type of transition for the transition out of the shot. 0 = Fade 1 = Dissolve
unlinkAudio(ula) boolean queryedit
COMMENT Unlinks any currently linked audio.

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 have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

myShot = cmds.shot('myShot', st=10, et=19);
cmds.shot(myShot, e=True, sst=100, set=119);
cmds.shot(myShot, q=True, st=True);
# Result: 10.0 #
cmds.shot(myShot, q=True, sst=True);
# Result: 100.0 #
cmds.shot(myShot, e=True, pst=10);
cmds.shot(myShot, q=True, set=True);
# Result: 119.0 #
cmds.shot(myShot, e=True, prt=5);
cmds.shot(myShot, q=True, set=True);
# Result: 124.0 #
cmds.shot(myShot, q=True, sd=True);
# Result: 25.0 #