ToggleCurrentLayerProperty

カテゴリ

layer

詳細

現在のレイヤの表示属性または選択属性を切り替えます。 現在のレイヤは、すべてのレイヤ操作の対象となるレイヤです。 新しいオブジェクトを作成すると、これらの属性が現在のレイヤに自動的に割り当てられます。 すべてのレイヤ属性は設定、変更できます。 たとえば、作業時に表示するレイヤを選択できます。 ワークスペースが整理されていなければ、一部のレイヤを非表示にし、無用な選択を避けることも可能です。

スクリプト構文

ToggleCurrentLayerProperty( [PropName] );

パラメータ

パラメータ タイプ 詳細
PropName 文字列 切り替えるパラメータのカンマ区切りのリスト。

デフォルト値: selectability

指定可能な値:

説明:

viewvis View visibility
rendvis Render visibility
selectability 選択の可/不可
ghosting アニメーションのゴースト

VBScript の例

' Create a cone, a cube and a sphere.
CreatePrim "Cone", "MeshSurface"
CreatePrim "Cube", "MeshSurface"
CreatePrim "Sphere", "MeshSurface"
' Select the cube and the sphere.
SelectObj "cube,sphere"
' Create a new layer and make it the current one.
CreateLayer , "MyLayer"
' As can be seen when showing Layers in the Explorer, the cube and the sphere
' were automatically put in MyLayer since they were selected.
' Toggle the view and the render visibilities of MyLayer in the viewports.
ToggleCurrentLayerProperty "viewvis,rendvis"
' The cube and the sphere are no longer visible in the viewports
' even if a render region is opened.
' Create a cylinder.
CreatePrim "Cylinder", "NurbsSurface"
' The cylinder is  assigned to the current layer MyLayer and is affected
' by the layer attributes which make it non visible in this example.