MappedItem

Object Hierarchy | Related C++ Class: MappedItem

Inheritance

SIObject

MappedItem

Introduced

v1.5

Description

The MappedItem object holds the DataSource of a Clip object. It provides access to the related source (MappedItem.Source2), the parameter which is driven by the related source (MappedItem.Destination), and any ClipEffectItems applied to the clip (MappedItem.ClipEffectItem).

Note: This object is available from the Clip.MappedItems property (which returns a MappedItemCollection). The MappedItem object is only available for clips instantiated from ActionSources (either action animation or shape animation). You can test this by calling the base property SIObject.Type on the Clip object which returns one of the values for the siClipType constant.

Methods

IsClassOf operator IsEqualTo operator    
       

Properties

Application Categories ClipEffectItem Destination
FullName operator Help Name operator NestedObjects
Origin OriginPath Parent Source2
Type operator      
       

Examples

JScript Example

/*
        This example demonstrates how to use MappedItems by creating some
        sources and clips and then finding the mapped items on the clips
        in the mixer.
*/
NewScene( null, false );
// Set up some sources and clips in the scene (see end of example for details)
CreateShapeAction( ActiveSceneRoot );
// Get all the clips in the mixer and then the sources
var clips = ActiveSceneRoot.Mixer.Clips;
for ( var i=0; i<clips.Count; i++ ) {
        // Look at their mapped items, but avoid the audio clips
        if ( clips(i).Type != siClipAudioType && clips(i).MappedItems ) {
                var clp = clips(i);
                LogMessage( "Found " + clp.MappedItems.Count + " mapped items(s)" );
                for ( var j=0; j<clp.MappedItems.Count; j++ ) {
                        var mapping = clp.MappedItems(j);
                        LogMessage( "\t...does it have a clip effect item associated? " 
                                + (mapping.ClipEffectItem.Expression != "") );
                        LogMessage( "\t...destination parameter: " + mapping.Destination );
                }
        }
}
// Expected results:
//INFO : Found 1 mapped items(s)
//INFO :        ...does it have a clip effect item associated? false
//INFO :        ...destination parameter: cone.polymsh.cls.Shape
// Convenience function
function CreateShapeAction( in_model )
{
        var obj = in_model.AddGeometry( "Cone", "MeshSurface" );
        var target = obj + ".pnt[0,2,5,8,11,14,17,20,23]"
        SetSelFilter( "Vertex" );
        SelectGeometryComponents( target );
        Translate( null, 0, -2, 0, siAbsolute, siPivot, siObj, siY, null, 
                null, null, null, null, null, null, null, null, 1 );
        SaveShapeKey( target, null, null, 1, null, null, null, 
                null, siShapeObjectReferenceMode );
}

See Also

Clip.MappedItems