DeleteUnusedMixerTracks

Introduced

4.0

Description

Deletes all tracks (of all types) on the mixer which are currently not in use (i.e. have no clips on them). Note that it will also recurse into compound clips to find and remove any unused tracks there.

Scripting Syntax

DeleteUnusedMixerTracks( [InputObj] )

Parameters

Parameter

Type

Description

InputObj

String

List of models to process.

Default Value: Current selection

Examples

JScript Example

// This JScript example shows creation of a bunch of dummy
// mixer tracks (of various kinds) and their subsequent removal
// using the DeleteUnusedMixerTracks command.
// Try running with and without the last line to see the
// difference...it ends up deleting all but two of the tracks
// it creates.

// Create a sphere and a simple static Action.
NewScene( null, false );
newSph = CreatePrim( "Sphere", "MeshSurface" );
oAction = StoreAction( "", "sphere/kine.local.posx,kine.local.posy,kine.local.posz",
   1, "StoredStaticPose", true, 1, 5, false, false );

// Create some tracks (mostly left empty to be deleted later).
count = 10
oTracks = new Array(count)
for ( i = 0; i < count; i++ )
{
   if ( i < 0.5 * count )
       trackType = 0; // Animation Tracks
   else if ( i < 0.8 * count )
       trackType = 1; // Shape Tracks
   else
       trackType = 2; // Audio Tracks
   oTracks[i] = AddTrack("Scene_Root", "Scene_Root", trackType, null, null);
}

// Add sources on some tracks.
AddClip( ActiveSceneRoot, oAction, null, oTracks[1], 1, null, null, null, null );
AddClip( ActiveSceneRoot, oAction, null, oTracks[4], 10, null, null, null, null );

// Finally, delete the unused ones.
DeleteUnusedMixerTracks( ActiveSceneRoot );

See Also

AddTrack

DeleteUnusedImageClips

DeleteUnusedImageSources



Autodesk Softimage v7.5