v5.0
シーンに関連付けられているすべての ImageClip オブジェクトを含む ImageClipCollection を戻します。イメージクリップとソースは、常に Clips ("Scene.Clips.Image")とSources("Scene.Sources.Image")コンテナ内のシーンの下に格納されています。
アニメーションクリップとソースでは、使用されているトラック、ミキサとモデルの下で保存されているアニメーションが異なります。Scene.ImageClips プロパティが、シーン内のすべてのイメージクリップを戻す一方で、ClipContainer.Clips および Track.Clips プロパティは、特定のコンテナ(ミキサまたはトラック)のクリップだけを戻します。
// 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 );
} |