SetCurrentLayer

SetCurrentLayer

詳細

現在のレイヤを設定します。

スクリプト構文

SetCurrentLayer( Value );

パラメータ

パラメータ タイプ 説明
Value 文字列 Layer

1. VBScript の例

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 の例

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

関連項目

SetCurrentPass