c4d.LayerSet

class c4d.LayerSet

This data type enables to access the layers of a bitmap shader.

Methods Signatures

LayerSet.__init__(self, v)
type v:c4d.LayerSet
LayerSet.Content(self) Check if the set is empty.
LayerSet.IsLayerEnabled(self, name) Check if a layer is enabled.
LayerSet.FindLayerSet(self, name) Check if a layer is in the set.
LayerSet.GetName(self) Get the set’s name.
LayerSet.GetMode(self) Returns the layer set mode.
LayerSet.SetMode(self, mode) Assign a new layer set mode.
LayerSet.RemoveLayer(self, layer) Remove a layer.
LayerSet.AddLayer(self, layer) Add a layer.
LayerSet.FlushLayers(self) Flush all layers.
LayerSet.GetPreviewMode(self) Return the preview mode.
LayerSet.SetPreviewMode(self, s) Set the preview mode.
LayerSet.CopyTo(self, dst) Copies the content from self to dst.

Inheritance

Parent Class:

Methods Documentation

LayerSet.__init__(self, v)
Parameters:v (c4d.LayerSet) – Source layer set for copy constructor.
Return type:c4d.LayerSet
Returns:The layer set instance.
LayerSet.Content(self)

Check if the set is empty.

Return type:bool
Returns:True if the set contains any layer, otherwise False.
LayerSet.IsLayerEnabled(self, name)

Check if a layer is enabled.

Parameters:name (str) – The layer name to check for.
Return type:bool
Returns:True if the layer is enabled, otherwise False.
LayerSet.FindLayerSet(self, name)

Check if a layer is in the set.

Parameters:name (str) – The layer name to check for.
Return type:bool
Returns:True if the layer is in the set, otherwise False.
LayerSet.GetName(self)

Get the set’s name.

Return type:str
Returns:The name of the set.
LayerSet.GetMode(self)

Returns the layer set mode.

Return type:int
Returns:The mode:
LAYERSETMODE_LAYERS Layers / layer Sets.
LAYERSETMODE_LAYERMASKS Layer masks.
LAYERSETMODE_ALPHAS Alpha channels.
LAYERSETMODE_LAYERALPHA Layer alpha.
LAYERSETMODE_DISABLED Disabled.
LayerSet.SetMode(self, mode)

Assign a new layer set mode.

Parameters:mode (int) –

The mode:

LAYERSETMODE_LAYERS Layers / layer Sets.
LAYERSETMODE_LAYERMASKS Layer masks.
LAYERSETMODE_ALPHAS Alpha channels.
LAYERSETMODE_LAYERALPHA Layer alpha.
LAYERSETMODE_DISABLED Disabled.
LayerSet.RemoveLayer(self, layer)

Remove a layer.

Parameters:layer (str) – The layer to remove.
LayerSet.AddLayer(self, layer)

Add a layer.

Parameters:layer (str) – The layer to add.
LayerSet.FlushLayers(self)

Flush all layers.

LayerSet.GetPreviewMode(self)

Return the preview mode.

Return type:int
Returns:The preview mode.
LayerSet.SetPreviewMode(self, s)

Set the preview mode.

Parameters:s (int) – The new preview mode.
LayerSet.CopyTo(self, dst)

Copies the content from self to dst.

Parameters:dst (c4d.LayerSet) – The destination layer set.