v5.0
Returns an ImageClipCollection containing all ImageClip objects
associated with the scene. Image clips and their sources are always stored under the Scene in the
Clips ("Scene.Clips.Image") and Sources ("Scene.Sources.Image") containers.
This differs from animation clips and sources for animation which are stored under the track, mixer, and
model where they are used, so the Scene.ImageClips property returns all image clips in the scene, whereas
the ClipContainer.Clips and Track.Clips properties return only clips
for the specific container (mixer or track).
// get accessor ImageClipCollection rtn = Scene.ImageClips; |
/* This example demonstrates how to get the image clips currently associated with the scene. */ // Set up three clips (see end of example) SetTheScene(); // Now access all image clips in the scene var cliplist = ActiveProject.ActiveScene.ImageClips; for ( var i=0; i<cliplist.Count; i++ ) { LogMessage( cliplist(i).FullName ); } // Expected result: //INFO : Clips.noIcon_pic //INFO : Clips.jio_jpg //INFO : Clips.xsilogo_jpg // Helper function to create several image clips function SetTheScene() { NewScene( null, false ); // Create an image clip by applying an image to a texture projection var cube = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" ); SelectObj( cube ); ApplyShader( null, null, null, siUnspecified, siLetLocalMaterialsOverlap ); CreateProjection( cube, siTxtSpherical, siTxtDefaultSpherical, "", "Texture_Projection", null, siRelDefault, "" ); BlendInTextureLayers( "Image", cube, 1, false, siReplaceAndBlendInPreset, true, true, false, false); // Create a source and then a clip var img = AddImageSource( "$SI_HOME\\Data\\XSI_SAMPLES\\Pictures\\jio.jpg" ); AddImageClip( img ); // Create a clip and use it in the fx tree sPath = InstallationPath( siFactoryPath ); var clip = CreateImageClip( sPath + "\\Data\\XSI_SAMPLES\\Pictures\\xsilogo.jpg" ); var tree = CreateFxTree(); AddImageClipFxOp( tree, clip ); } |