## GetCurrentPass

### Description

Gets the the current pass.

### Scripting Syntax

    oReturn = GetCurrentPass();

### Return Value

Returns the current pass as a Pass object.

### Examples

#### VBScript Example

    '

    '	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)"

### See Also

SetCurrentPass DeleteCurrentPass