render
新しいパスを作成し、現在のパスとして設定します。
注: このコマンドは、出力引数を使用します。 C#
および一部のスクリプト言語(JScript、PerlScript、Python
など)は、リファレンスによって渡される引数をサポートしていません。このため、状況に応じた適切な回避策を実行する必要があります。
スクリプト言語の場合、このコマンドは出力引数を取得するために使用できる ISIVTCollection を戻します。
C# の場合は、XSIApplication.ExecuteCommand
メソッドを使用してこのコマンドを呼び出すことができます。 ExecuteCommand は、出力引数を C# の
System.Object (出力引数の配列を含む)にパック化します(詳細については、「C#
からのコマンドの呼び出し」を参照)。
CreatePass( [PresetObj], [Name], [Value] ); |
| パラメータ | タイプ | 詳細 |
|---|---|---|
| PresetObj | 文字列 またはプリセット オブジェクト(「SIGetPreset」を参照) | 任意のパス プリセット
デフォルト値:"Pass" (デフォルトのパス) |
| Name | 文字列 | 新しいパスの名前
デフォルト値:デフォルトのパス名(例: Ambient_Pass) |
| 値 | パス | 新しいパスを戻します。 |
'
' This example demonstrates how to create different types of passes
' based on pass presets. It also shows how to get a list of all
' passes in the scene as an XSICollection.
'
' Create a new scene
NewScene , false
' Print out the current list of passes
getPassInfo
Application.LogMessage "-------------------"
' Create a diffuse pass
CreatePass InstallationPath( siFactoryPath ) _
& "\Data\DSPresets\Groups\Diffuse_Pass.Preset", "Different_Pass"
' Create a depth pass
CreatePass InstallationPath( siFactoryPath ) _
& "\Data\DSPresets\Groups\Depth_Pass.Preset", "Deep_Pass"
' Print out the new list of passes
getPassInfo
function getPassInfo()
' We can use a string expression with a wildcard to specify all passes
' and then convert it to an XSICollection for easier navigation
Set oPasses = CreateObject( "XSI.Collection" )
oPasses.SetAsText "Passes.*"
' Loop through the passes and print their names
For Each p In oPasses
Application.LogMessage p.Name
Next
end function
' Output of the above script (the current pass is repeated):
'INFO : "List"
'INFO : "Default_Pass"
'INFO : "Default_Pass"
'INFO : "-------------------"
'INFO : "List"
'INFO : "Default_Pass"
'INFO : "Different_Pass"
'INFO : "Deep_Pass"
'INFO : "Deep_Pass"
|