MxTrack Class

Properties

tracktype : name (#layertrack | #transtrack)

 

mute : boolean

 

solo : boolean

If you turn mute on, solo will be turned off, and visa versa.

 

transPreserveHgt : boolean

Although this appears in the transition edit dialog, it is actually set for the entire track.

numClips : integer

numTransClips : integer

For a layer track, this will always return 0. For a transition track, this will return the number of clips which are actually part of the transitioning clips in the track. A greyed out clip will not be counted. This value should be used to loop through the transition clips, in order, using the GetClip function.

numWeights : integer, not settable

The number of weights in the track’s weight curve (relevant for transition tracks only)

Methods

getclip <track:mxtrack> <index:integer>

This will return the clip in the track specified by the index. Indices start with 1. In the case of a transition track, this will be an index into the set of clips, in order, which are actually part of the transitioning clips in the track. A greyed out clip will not be counted. Use numTransClips to find out how many transitioning clips there are in the track.

 

cleartrack <track:mxtrack>

This deletes all the clips in the track. It returns true.

 

appendClip <track: mxtrack > <fname:string> <ZeroFootHgt:boolean> <interval:timevalue>

The specified bip file will be loaded into the new clip, and the reservoir, using the ZeroFootHeight parameter. For layer tracks, the start of the new clip will be appended interval time from the end of the last clip in the track. The interval variable must be >= 0. For transition tracks, the interval parameter is ignored. The start of the new clip will be at the inpoint of the last clip in the track, and it will be on the opposite row of the last clip. It will start later if it collides with another clip. For both layer and transition tracks, if there are no clips in the track, the new clip will start at frame 0. This returns false if the specified file could not be loaded. Otherwise, it returns true.

 

optimizeTransitions <track:mxtrack> <PreferredTransLength:integer> <SearchEntireClip:boolean> <SearchRangeBefore:integer> <SearchRangeAfter:integer>

If this function is called for layer a track, it will return false and do nothing. PreferredTransLength and the search ranges must be positive values. They are in frames. If they are negative values, the optimization will not be performed and the function will return false. Otherwise, the function will return true/false describing whether or not it was successful. If optimization requires clips to be trimmed to avoid visual overlap, then they will be trimmed.

 

optimizeClipTransition <track:mxtrack > <PreferredTransLength:integer> <SearchEntireClip:boolean> <SearchRangeBefore:integer> <SearchRangeAfter:integer> <ClipIndex:integer>

See notes above about legal parameter values. This optimizes only a single clip's transition. The ClipIndex is an index into the track's trans clips and specifies which clip’s transition, from itself to the next clip, will be optimized. If the ClipIndex is out of range of the trans clips, the optimization will not be performed and the function will return false.

getWeight <index::integer >

This returns the weight at the specified index in the track’s weight curve. If the Index is out of bounds, the function will return 0.0.

 

getWeightTime <index::integer >

This returns the time at the specified index in the track’s weight curve. If the Index is out of bounds, the function will return 0.

 

deleteWeight <index::integer >

This deletes the weight at the specified index in the track’s weight curve. If the Index is out of bounds, the function will return false. Otherwise, it returns true.

 

setWeight <index::integer > <float::weight>

This sets the weight at the specified index in the track’s weight curve. If the Index is out of bounds or weight is not between 0.0 and 1.0, the function will return false. Otherwise, it returns true.

 

setWeightTime <index::integer > <time::timevalue>

This sets the time at the specified index in the track’s weight curve. If the Index is out of bounds or time is not between the time values of the previous and next values in the weight curve, the function will return false. Otherwise, it returns true.

 

setWeightAtTime <time::timevalue> <float::weight>

If there is a key at time time on the weight curve, this will reset the weight at that key. If not, this will create a new key at time time with weight weight.

 

getWeightAtTime <time::timevalue>

If t is at a key at time time in the weight curve, this returns the weight at that key. Otherwise, it returns the interpolated weight at time time. If there are no weights, this returns 1.0.

 

See also

Mixer MAXScript Extensions

MAXScript Extensions in character studio