ToggleCurrentLayerP roperty

Description

Toggles the visibility and selectability attributes of the current layer. The current layer is the layer to which all layer operations are applied. When you create new objects, they are automatically assigned to the current layer. You can set and change all of a layer's attributes. For example, you can choose which layers you want to view while working. Or, if your workspace is cluttered, you can make some layers unselectable to avoid unwanted selections.

Scripting Syntax

    ToggleCurrentLayerProperty( [PropName] )

Parameters

Parameter | Type | Description
PropName | String | Comma-separated list of parameters to toggle. Default Value: selectability Possible Values: • viewvis: View visibility • rendvis: Render visibility • selectability: Selectability • ghosting: Animation ghosting

Examples

VBScript Example

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

Autodesk Softimage v7.5