GetCurrentPass

詳細

現在のパスを取得します。

スクリプト構文

oReturn = GetCurrentPass();

戻り値

現在のパスを Pass オブジェクトとして戻します。

VBScript の例

'

'	This example demonstrates how to get an object pointer to 

'	the current pass. It also shows how to get a collection of

'	all passes in the scene.

'

' Create a new scene 

NewScene , false

' Create a few dummy passes to play with

CreatePass , "Sneezy"

CreatePass , "Grumpy"

CreatePass , "Wimpy"

' Which one is the current pass and what type of object is it?

Set oPass = GetCurrentPass 

Application.LogMessage oPass.Name & " (a " & TypeName( oPass ) & ") is one of the following passes:"

' Get the collection of all passes in the scene

Set oPassList = CreateObject( "XSI.Collection" )

oPassList.SetAsText "Passes.*"

' Loop through the collection, printing out the names of the passes

' Note that the final member is the default pass

For i = 0 To oPassList.Count - 1

	Application.LogMessage oPassList(i).Name & " (a " _

		& TypeName( oPassList(i) ) & ")"

Next

' Output of above script:

'INFO : "Wimpy (a Pass) is one of the following passes:"

'INFO : "List (a Parameter)"

'INFO : "Default_Pass (a Pass)"

'INFO : "Sneezy (a Pass)"

'INFO : "Grumpy (a Pass)"

'INFO : "Wimpy (a Pass)"

'INFO : "Wimpy (a Pass)"

関連項目

SetCurrentPass DeleteCurrentPass