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

Synopsis

shotTrack([insertTrack=uint], [lock=boolean], [mute=boolean], [numTracks=uint], [removeEmptyTracks=boolean], [removeTrack=uint], [selfmute=boolean], [solo=boolean], [swapTracks=[uint, uint]], [title=string], [track=uint], [unsolo=boolean])

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

Related

shot

Flags

insertTrack, lock, mute, numTracks, removeEmptyTracks, removeTrack, selfmute, solo, swapTracks, title, track, unsolo
Long name (short name) Argument types Properties
insertTrack(it) uint create
This flag is used to insert a new empty track at the track index specified.
lock(l) boolean createqueryedit
This flag specifies whether shots on a track are to be locked 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
removeEmptyTracks(ret) boolean create
This flag is used to remove all tracks that have no clips.
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.
selfmute(sm) boolean createqueryedit
This flag specifies whether shots on a track are to be muted or not (unlike mute, this disregards soloing).
solo(so) boolean createqueryedit
This flag specifies whether shots on a track are to be soloed or not.
swapTracks(st) [uint, uint] create
This flag is used to swap the contents of two specified tracks.
title(t) string createqueryedit
This flag specifies the title for the track.
track(tr) uint createqueryedit
Specify the track on which to operate by using the track's trackNumber.

In query mode, this flag needs a value.

unsolo(uso) boolean query
This flag specifies whether shots on a track are to be unsoloed or not.

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

# Create 3 sequencer tracks with appropriate names.
# Note that sequencer tracks are 1-indexed.
#
cmds.file(f=True,new=True)
for i in xrange(1,4):
    cmds.shotTrack(insertTrack=i, title="Track %d"%i)
# Add some shots to the tracks.
# By default, shots get added to the active track,
# which is currently track 1. If tracks overlap in sequence time
# they will be put onto a different track.
#
cmds.shot("shot1", sequenceStartTime=10, startTime=20, endTime=39)
cmds.shot("shot2", sequenceStartTime=30, startTime=10, endTime=29)
cmds.shot("shot3", sequenceStartTime=50, startTime=60, endTime=79)
# Use the shot command to move shots to different tracks
cmds.shot("shot1", e=True, track=1)
cmds.shot("shot2", e=True, track=2)
cmds.shot("shot3", e=True, track=3)
# Insert an empty track at index 2
cmds.shotTrack(insertTrack=2)
# Lock the track containing shot3
cmds.shotTrack("shot3", lock=True)
# Mute the track containing shot1
cmds.shotTrack("shot1", mute=True)
# Remove track 2
cmds.shotTrack(removeTrack=2);
# Query the track title for the first track
cmds.shotTrack(q=True, track=2, title=True)