SetCurrentPass

Categories

render

Description

Sets the current pass.

A render pass creates a picture layer of a scene that can be composited with any other passes to create a complete image.

Scripting Syntax

SetCurrentPass( Value );

Parameters

Parameter Type Description
Value String Pass to set as the current pass.

Default Value: Selected pass

Examples

VBScript Example

'
'       This example demonstrates how to set 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 & " is the current pass."
' Get the collection of all passes in the scene
Set oPassList = CreateObject( "XSI.Collection" )
oPassList.SetAsText "Passes.*"
' Loop through the collection to get the one named "Sneezy"
For Each p In oPassList
        If p.Name = "Sneezy" Then
                Set oNewPass = p
                Exit For
        End If
Next
' Change the current pass to Sneezy
SetCurrentPass oNewPass 
' Which one is the current pass and what type of object is it?
Set oPass = GetCurrentPass 
Application.LogMessage oPass.Name & " is the current pass."
' Output of above script:
'INFO : "Wimpy is the current pass."
'
'INFO : "Sneezy is the current pass."

See Also

CreatePass GetCurrentPass DeleteCurrentPass