Interface: LayerProperties

LayerProperties is a MixinInterface providing access to a specific layer's properties. This interface is returned by some methods in the Interface: LayerManager core interface and the Interface: INodeLayerProperties node interface.

Interface: LayerProperties

Properties:

.on : boolean : Read|Write

Get/Set the Enabled state of the layer.

.lock : boolean : Read|Write

Get/Set the Locked state of the layer.

.current : boolean : Read|Write

Get/Set whether the layer is the Current layer.

Note:

Can only be set to true!

.wireColor : color by value : Read|Write

Get/Set the Wireframe Color of the layer.

.isGIExcluded : boolean : Read|Write

Get/Set the Exclude from Radiosity state of the layer.

.name : string : Read

Get the name of the layer.

.renderable : bool : Read|Write

Get/Set whether the objects on the layer are renderable.

.inheritVisibility : bool : Read|Write

Get/Set whether the objects on the layer inherit visibility from their parents.

.primaryVisibility : bool : Read|Write

Get/Set whether the objects on the layer are visible to camera

.secondaryVisibility : bool : Read|Write

Get/Set whether the objects on the layer are reflections

.receiveshadows : bool : Read|Write

Get/Set whether the objects on the layer receive shadows.

.castShadows : bool : Read|Write

Get/Set whether the objects on the layer cast shadows.

.applyAtmospherics : bool : Read|Write

Get/Set whether the objects on the layer can be occluded by atmospheric effects

.renderOccluded : bool : Read|Write

Get/Set whether the objects on the layer will render to RPF layers when occluded.

.ishidden : bool : Read|Write

Get/Set whether the objects on the layer are hidden.

.isfrozen : bool : Read|Write

Get/Set whether the objects on the layer are frozen.

.boxmode : bool : Read|Write

Get/Set whether the objects on the layer will be displayed in box mode.

.backfacecull : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with culled backfaces.

.alledges : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with all edges visible.

.vertexTicks : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with vertices as ticks..

.showTrajectory : bool : Read|Write

Get/Set whether the objects on the layer will show trajectories

.xray : bool : Read|Write

Get/Set whether the objects on the layer will be displayed as See-Thru

.ignoreExtents : bool : Read|Write

Get/Set whether the extents of the objects on the layer will be ignored.

.showFrozenInGray : bool : Read|Write

Get/Set whether the objects on the layer will be displayed as grey when frozen.

.showVertexColors : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with vertex colors.

.vertexColorsShaded : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with shaded vertex colors.

.visibility : float : Read|Write

Get/Set whether the objects on the layer will be visible.

.imageMotionBlurMultiplier : float : Read|Write

Get/Set the Image Motion Blur Multiplier for objects on the layer

.motionBlurOn : bool : Read|Write

Get/Set whether the objects on the layer will render with Motion Blur.

.motionblur : enum : Read|Write

motionblur enums: {#none|#object|#image}

Get/Set the type of Motion Blur to be used when rendering objects of the layer

.display : enum : Read|Write

display enums: {#viewport|#boundingbox|#wireframe|#shaded}

Get/Set the display mode for all objects on the layer.

.INodeGIProperties : Interface : Read

The INodeGIProperties property returns a INodeGIProperties FPS interface giving access to the GI properties of the layer. See Interface: INodeGIProperties

.layerAsRefTarg : RefTarget : Read

Returns the layer as a ReferenceTarget.

Note that the layer system operates exactly the opposite of what you would expect - the node's reference the layer, rather than the layers referencing the node.

Example:

s=sphere() --Create a sphere, store in variable

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

sphere() --Create another one

$Sphere:Sphere02 @ [0.000000,0.000000,0.000000]

layer = layermanager.getlayer 0 --get default Layer 0

<MixinInterface:LayerProperties>

layerRT = layer.layerAsRefTarg --get layer as RefTarget

ReferenceTarget:BaseLayer

refs.dependents layerRT --see the dependents

#($Sphere:Sphere02 @ [0.0,0.0,0.0], $Sphere:Sphere01 @ [0.0,0.0,0.0], ReferenceTarget:Animatable, ReferenceTarget:Animatable, ReferenceTarget:LayerManager, ReferenceTarget:Scene)

refs.dependson s

#(Controller:Position_Rotation_Scale, Sphere, ReferenceTarget:BaseLayer)

Methods:

<void>addnode <node>node

Adds the given node to the layer.

 

<void>select <boolean>OnOff

Sets the selected state to the supplied boolean value.

 

<boolean>setname <string>name

Sets the name of the layer to the given name. Returns true on success.

Note:

Layer names must be unique, which is why a method is used to set the layer name.

 

<boolean>nodes <&node array>layerNodes

layerNodes is Out parameter

Returns true on success, and an array of all nodes on the layer in the by-reference Out parameter.

See also

Interface: INodeLayerProperties

Interface: INodeGIProperties

Interface: LayerManager