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.

 

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 (OM) property or SIObject::GetType (C++) function.

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

Mixer

Model.Mixer

Model::GetMixer

Specialization of ClipContainer

siClipMixerType (from siClipType)

siMixerID

• It’s really a clip at heart.

• You can test to see whether a mixer exists under a model with Model.HasMixer or Model::HasMixer

ClipContainer

ClipContainer

Model.Mixer

Model::GetMixer

ClipContainer.Clips

ClipContainer::GetClips

Track.Clips

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.

From siClipType:

siClipMixerType

siClipAnimCompoundType

siClipShapeCompoundType

siClipContainerID

• The Clips/GetClips 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

Clip

ClipContainer.Clips

ClipContainer::GetClips

Track.Clips

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

ClipRelation

Clip.Relations (OM only)

ClipContainer.NestedRelations

ClipContainer::GetNestedRelations

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

"ClipRelation" (not a value in any enum)

siClipRelationID

• There is no equivalent to Clip.Relations in the C++ API

Track

Track

ClipContainer.Tracks

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

Transition

ClipContainer.Transitions

Gives access to start and end clips.

any of the values in the siTransitionType enum

siTransitionID

--

Source

Source

Clip.Source

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

ActionSource

Clip.Source

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

AnimationSourceItem

ActionSource.SourceItems

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

• There is no equivalent to the AnimationSourceItem.SetAsFCurve function iin the C++ API

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

AnimationSource

AnimationSource

AnimationSourceItem.Source

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)

• Valid types of AnimationSources are listed in the siAnimationSourceItemType enum

• Trying to get the AnimationSource from a compound animation source item will fail (see AnimationSourceItem.Source).

MappedItem

MappedItem

Clip.MappedItems

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

ClipEffect

Clip.Effect

Clip::GetEffect

Gives access to ClipEffectItems.

"" (empty string)

siClipEffectID

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

ClipEffectItem

ClipEffectItem

MappedItem.ClipEffectItem

MappedItem::GetClipEffectItem

ClipEffect.Items

ClipEffect::GetItems

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

"" (empty string)

siClipEffectItemID

• Each expression is bound to a MappedItem of a Clip

TimeControl

TimeControl

Clip.TimeControl

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

 

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.



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index