FileReference.NumberOfFilesInSequence

説明

このファイルのシーケンスに含まれるファイルの数をLongとして戻します。シーケンスが 1 つのファイルで構成されている場合は、このプロパティは 1を戻します。

ファイル シーケンスは、「myfile.1.pic」、「myfile.2.pic」など、同じ基本名を持つ複数のファイルです。たとえば、ディスクにレンダリングする場合、[レンダリング オプション]プロパティ ページで指定した基本ファイル名に基づいて Softimage でファイル シーケンスが作成されます。出力フォルダを参照する場合は、「'myfile[1..2].pic」などのようにアノテーション付きでファイル シーケンスが単一エンティティとして表示されます。

JScript の例

NewScene( null, false );
// ---------------------------------------------------------------------------
//      SETUP
//
// First import a model so we have some external files to find
var FPath = XSIUtils.BuildPath(
        Application.InstallationPath( siFactoryPath ),
        "Data", "XSI_SAMPLES", "Models", "Man_Face.emdl"
);
ImportModel( FPath, null, true );
// ---------------------------------------------------------------------------
//      USING THE FileReference OBJECT
//
// Get the collection of all external files on the scene
var oScene = Application.ActiveProject.ActiveScene;
var l_extFileList = oScene.ExternalFiles;
// Get the first file object in the list
var oFile = l_extFileList(0);
// Show the number of files.
Application.LogMessage( "The number of files is: " + oFile.NumberOfFilesInSequence );
// Expected results:
//INFO : The number of files is: 3

関連項目

FileReference.GetFileInSequence