Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
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.
None
In query mode, return type is based on queried flag.
shot, sequencer, track
shot
insertTrack, lock, mute, numTracks, removeEmptyTracks, removeTrack, selfmute, solo, swapTracks, title, track, unsolo
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.
|
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)