Go to: Synopsis. Return value. Keywords.
Flags. Python
examples.
audioTrack([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.
audioTrack is undoable, queryable, and editable.
This command is used for inserting and removing tracks related to
the audio clips 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, audio, sequencer, track
insertTrack, lock, mute, numTracks, removeEmptyTracks, removeTrack, solo,
swapTracks
Long name (short name) |
Argument types |
Properties |
swapTracks(st) |
[uint, uint] |
 |
|
This flag is used to swap the contents of two specified tracks.
Indices are 1-based. |
|
insertTrack(it) |
uint |
 |
|
This flag is used to insert a new empty track at the track
index specified. Indices are 1-based. |
|
removeTrack(rt) |
uint |
 |
|
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 |
 |
|
This flag is used to remove all tracks that have no clips. |
|
lock(l) |
boolean |
   |
|
This flag specifies whether all audio clips on the same track
as the specified audio node are to be locked at their current
location and track. |
|
solo(so) |
boolean |
   |
|
This flag specifies whether all audio clips on the same track
as the specified audio node are to be soloed or not. |
|
mute(m) |
boolean |
   |
|
This flag specifies whether all audio clips on the same track
as the specified audio node are to be muted or not. |
|
numTracks(nt) |
uint |
 |
|
To query the number of audio 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. |
import maya.cmds as cmds
# Move the audio clip named "audio2" to track 3
#
cmds.audioTrack( 'audio2', track=3 )
# Lock the track containing the audio clip named "audio1"
#
cmds.audioTrack( 'audio1', lock=True )
# Remove any empty tracks
#
cmds.audioTrack(removeEmptyTracks=True)
# audioTrack -q -track audio1;
#
cmds.audioTrack( 'audio1', q=True, track=True )