Animation Mixer

 
 
 

The Animation Mixer is a tool that allows users to layer and mix sequences in a nonlinear and non-destructive way. A user can insert clips onto the mixer's tracks and then create relations and transitions between clips, change the timing of the sequence, and apply other kinds of effects.

Note

See Sources and Clips for an explanation of how data is loaded into the mixer from the perspective of the SDK. For more information on the mixer in general, see the Nonlinear Animation (user) guide.

This diagram illustrates what you can expect when writing scripts or programs that read mixer data. There is only one mixer per model, which means that animation in a scene can be organized by model (character). In the diagram above, the SceneRoot is at the top, but any model could be at the top.

Accessing the Mixer and its Components

The Mixer class itself is really a special kind of ClipContainer, which is in turn a kind of Clip on steroids: the ClipContainer class represents compound clips (of which the Mixer is the Ď‹ber-container). Here is a quick breakdown of the common classes you will work with while working with the Mixer and high-level animation. The table presents the following information:

  • Class/Object: Provides links to the OM object and C++ class in question.

  • Accessed via...: Gives a link to the OM property and C++ function which you can use to access each object.

  • Synopsis: Provides a brief overview of the object or class. The reference page will provide more details.

  • Type: Lists the possible return values if you test the object's type using the SIObject.Type or SIObject::GetType property.

  • siClassID: Gives the class id (as one of the siClassID enum values) that you can use to test with the SIObject.IsClassOf method in the object model or against the return value from any of the GetClassID functions implemented on each class in the C++ API.

  • What to Look Out for: Any tricks, restrictions or limitations are presented here.

Class/Object

Accessed via...

Synopsis

Type

siClassID

What to Look Out for

Mixer or Mixer

Model.Mixer or Model::GetMixer

Specialization of ClipContainer

ClipContainer or ClipContainer

Model.Mixer or Model::GetMixer

ClipContainer.Clips or ClipContainer::GetClips

Track.Clips or Track::GetClips

Gives access to the basic elements of the mixer: clips, tracks, transitions, and clip relations.

Mostly used for compound clips, but can also represent the Mixer. Both can contain other clips, tracks and transitions.

  • The (Get)Clips members return only the highest level (ie., the compound clip). You need to re-query to get the clips nested under each compound clip.

Clip or Clip

ClipContainer.Clips or ClipContainer::GetClips

Track.Clips or Track::GetClips

Basic building block in the mixer which gives you access to the bulk of data: tracks, transitions, clip relations, sources, clipeffects, mapped items and the time control

any of the values in the siClipType enum

siClipID

  • It's good practice to test the clip to see whether it contains nested clips using SIObject.IsClassOf(siClassID) or SIObject::GetClassID because some of the members of the Clip class are not available for compound clips.

ClipRelation or ClipRelation

Clip.Relations (OM only) ClipContainer.NestedRelations or ClipContainer::GetNestedRelations

Find out which is master/slave and swap ('bout what you'd expect)

"ClipRelation" (not a value in any enum)

siClipRelationID

Track or Track

ClipContainer.Tracks or ClipContainer::GetTracks

Just a conduit to clips

siTrackType will match up with siClipType on the track's clip collection

siTrackID

  • You can only explicitly add a track with the AddTrack command, but tracks are automatically added when using the AddClip command.

Transition or Transition

Gives access to start and end clips.

any of the values in the siTransitionType enum

siTransitionID

--

Source or Source

Clip.Source or Clip::GetSource

Generic source for action, audio, and images. Gives access to properties.

Note

Most of the real functionality for animation is provided via the ActionSource instead.

siImageSourceType (from siType)

siSourceID

--

ActionSource or ActionSource

Clip.Source or Clip::GetSource

Allows you to offload and reload sources but mostly gives access to underlying animation source items.

siActionType (from siType)

siActionSourceID

  • ActionSource objects may contain actions based on DataSource objects or other ActionSources

  • ActionSources store parameter paths as Relative Names

  • Some functionality changed at v4.0 (see reference for details).

AnimationSourceItem or AnimationSourceItem

ActionSource.SourceItems or ActionSource::GetItems

Gives access to the animation DataSource (for example, an FCurve) and its target (the parameter which the animation source drives).

any value from the siAnimationSourceItemType enum

siAnimationSourceItemID

AnimationSource or AnimationSource

AnimationSourceItem.Source or AnimationSourceItem::GetSource

Not a true interface: basically an alias for fcurves, expressions, constraints, shape keys, etc.

whatever the animation source's data type is (eg., an FCurve will return one of the siFCurveType values)

does NOT match siAnimationSourceID but rather any source's class ID (eg., an FCurve will return true when tested with siFCurveID and false with siAnimationSourceID)

MappedItem or MappedItem

Clip.MappedItems or Clip::GetMappedItems

Gives access to the related source, the parameter which is driven by the related source, and any clip effect items applied to the clip

any value from the siMappedItemType enum

siMappedItemID

  • Only available from clips instantiated from either action or shape animation ActionSources

ClipEffect or ClipEffect

Clip.Effect or Clip::GetEffect

Gives access to ClipEffectItems.

"" (empty string)

siClipEffectID

  • Each ClipEffect contains one ClipEffectItem for every mapped item on the clip

ClipEffectItem or ClipEffectItem

MappedItem.ClipEffectItem or MappedItem::GetClipEffectItem

ClipEffect.Items or ClipEffect::GetItems

Contains expressions that control the clip without affecting the Source on which the clip was instantiated.

"" (empty string)

siClipEffectItemID

TimeControl or TimeControl

Clip.TimeControl or Clip::GetTimeControl

Gives access to the clip's Time Control property, which may be used to add extra clip effects like cycling, bouncing, or holding for fractions of the clip length.

"timectrl" (scripting name of the Time Control property)

siTimeControlID

  • Time control effects applied to a specific clip do not alter the original source, nor any other clip instantiated on that source

  • Access to Time Control's parameters is read-only

Important

Don't mix global and local sources (that is, action based on animation defined in global vs. local mode) in the mixer. The results will be unpredictable. And remember, constraints are always defined in global space.