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

Synopsis

shotTrack([insertTrack=uint], [lock=boolean], [mute=boolean], [numTracks=uint], [removeEmptyTracks=boolean], [removeTrack=uint], [solo=boolean], [swapTracks=[uint, uint]])

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

shotTrack is undoable, queryable, and editable.

This command is used for inserting and removing tracks related to the shots displayed in the Sequencer. It can also be used to modify the track state, for example, to lock or mute a track.

Return value

None

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

Keywords

shot, sequencer, track

Flags

insertTrack, lock, mute, numTracks, removeEmptyTracks, removeTrack, solo, swapTracks
Long name (short name) Argument types Properties
swapTracks(st) [uint, uint] create
This flag is used to swap the contents of two specified tracks.
insertTrack(it) uint create
This flag is used to insert a new empty track at the track index specified.
removeTrack(rt) uint create
This flag is used to remove the track with the specified index. The track must have no clips on it before it can be removed.
removeEmptyTracks(ret) boolean create
This flag is used to remove all tracks that have no clips.
lock(l) boolean createqueryedit
This flag specifies whether shots on a track are to be locked or not.
solo(so) boolean createqueryedit
This flag specifies whether shots on a track are to be soloed or not.
mute(m) boolean createqueryedit
This flag specifies whether shots on a track are to be muted or not.
numTracks(nt) uint query
To query the number of tracks

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

#  Move the shot named "shot2" to track 3
#
cmds.shotTrack( 'shot2', track=3 )
# Lock the track containing the shot named "shot1"
#
cmds.shotTrack( 'shot1', lock=True )
# Remove any empty tracks
#
cmds.shotTrack(removeEmptyTracks=True)
# shotTrack -q -track shot1;
#
cmds.shotTrack( 'shot1', q=True, track=True )