Description
Sets the current layer.
Scripting Syntax
SetCurrentLayer( Value )
Parameters
|
Parameter |
Type |
Description |
|
Value |
Layer |
Examples
1. VBScript Example
Dim oLayer, oGroup ' Create two nulls GetPrim "Null" GetPrim "Null" ' Add them to a new group Set oGroup = CreateGroup( "NullsGroup", "null*" ) ' Move the group to a new layer and make it the current layer CreateLayer , "LayerNulls", oGroup, oLayer SetCurrentLayer oLayer
2. VBScript Example
' Get initial settings checkCurrLayer ' Make a new layer (it is *not* automatically set as current) SICreateLayer , "LayerA",oLayer checkCurrLayer ' Now explicitly set the new layer as current and check again SetCurrentLayer oLayer checkCurrLayer ' Make another new layer (it *is* automatically set as current) CreateLayer , "LayerB",,oLayer SetCurrentLayer oLayer checkCurrLayer function checkCurrLayer() ' What is the current layer? GetCurrentLayer oCurrLayer LogMessage "Current layer is....." & oCurrLayer end function 'OUTPUT OF ABOVE SCRIPT IS: 'INFO : "Current layer is.....Layers.Layer_Default" 'INFO : "Current layer is.....Layers.Layer_Default" 'INFO : "Current layer is.....Layers.LayerA" 'INFO : "Current layer is.....Layers.LayerB"
See Also
SOFTIMAGE|XSI v6.01