vray.VFBLayer

class vray.VFBLayer

Bases: object

A wrapper for a VFBLayer instance in the V-Ray core. It exposes the instance’s properties as a dictionary.

Methods

__init__()

canBlend

Checks if a layer can be blended.

canDelete

Checks if a layer can be deleted by the user.

getBlendMode

Gets layer blending mode, if the layer is blendable. Blend modes are available for all Color correction layers, Composite layers, folders, and multiple masks applied on a single layer or folder. When adding a new layer, it is placed on top of the stack and it is considered the foreground (FG). The result of all layers below it is considered the background (BG). Layers are applied from the bottom to the top. Where darker and lighter pixels are mentioned below, it is in relation to mid-grey. The available values are: * ‘BlendMode_Overwrite’ - Displays the current layer (FG) on top of all layers (BG) without blending. This is the default. * ‘BlendMode_Average’ - The average of the current layer (FG) and the result from the layers below it (BG). * ‘BlendMode_Add’ - Adds the FG to the BG. * ‘BlendMode_Subtract’ - Subtracts the FG from the BG. Does not affect completely black areas. * ‘BlendMode_Darken’ - Compares the FG to the BG and takes the darker pixel values of the two. * ‘BlendMode_Multiply’ - Multiplies the FG by the BG. * ‘BlendMode_ColorBurn’ - The color of the FG is applied to darker pixels in the BG. * ‘BlendMode_LinearBurn’ - Same as Color Burn but with less contrast. * ‘BlendMode_Lighten’ - Compares the FG to the BG and takes the lighter of the two. * ‘BlendMode_Screen’ - Makes both light and dark areas lighter. * ‘BlendMode_ColorDodge’ - Also known as ‘Color Dodge (8bit)’. The color of the FG is applied to lighter pixels in the BG. * ‘BlendMode_LinearDodge’ - Also known as ‘Linear Dodge (8bit)’. Same as Color Dodge but with less contrast. * ‘BlendMode_Spotlight’ - Also known as ‘Spotlight (8bit)’. Same as Multiply, but with twice the brightness. * ‘BlendMode_SplotlightBlend’ - Also known as ‘Spotlight Blend (8bit)’. Same as Spotlight, but additionally brightens the BG. * ‘BlendMode_Overlay’ - Also known as ‘Overlay (8bit)’. Darker pixels become darker where the BG is dark and brighter pixels become brighter where the BG is bright. * ‘BlendMode_Softlight’ - Also known as ‘Soft Light (8bit)’. Darker pixels become darker where the FG is dark and brighter pixels become brighter where the FG is bright. * ‘BlendMode_Hardlight’ - Also known as ‘Hard Light (8bit)’. Spotlight is applied to pixels where the FG is dark and Screen is applied to pixels where the FG is bright. * ‘BlendMode_Pinlight’ - Replaces the BG colors depending on the brightness of the FG color. If the FG color is lighter than mid-gray, BG colors darker than the FG color are replaced and vice versa. * ‘BlendMode_Hardmix’ - Also known as ‘Hard Mix (8bit)’. Adds the FG to the BG and for each color component returns a value of 255 if the result is 255 or greater, or returns 0 if the result is less than 255. * ‘BlendMode_Difference’ - Compares the pixels in the BG and FG and subtracts the darker pixels from the brighter ones. * ‘BlendMode_Exclusion’ - Same as Difference but with less contrast. * ‘BlendMode_Hue’ - Uses the hue from the FG, while the value and saturation are taken from the BG. * ‘BlendMode_Saturation’ - Uses the saturation from the FG, while the value and hue are taken from the BG. * ‘BlendMode_Color’ - Uses the hue and saturation from the FG, while the value is taken from the BG. * ‘BlendMode_Value’ - Uses the value from the FG, while the hue and saturation are taken from the BG. * ‘BlendMode_Divide’ - Subtracts the BG from the FG. Dark areas of the render are brightened, while bright areas of the render are not changed significantly. Does not affect completely white areas. * ‘BlendMode_Normal’ - Blends the alpha of the <code>VRayMtlSelect</code> render element’s material and other layers. * ‘BlendMode_Background’ - Use as background. * ‘BlendMode_Foreground’ - Use as foreground. * ‘BlendMode_FgWhiteMask’ - Special mode used when masking the input of some layer. It will treat the Fg as a mask and if it is white (> 0.99) will get the Bg color. Otherwise - black.

getChild

Returns the specific child of the layer.

getChildren

Returns a list of the children of the layer.

getChildrenCount

Returns number of children of the layer.

getClass

Get the layer class.

getEnabled

Returns true if the layer is enabled.

getIntegerID

Returns the ID of the layer instance.

getLayerEnumProperties

Gets a list of all properties of the layer which are integer enumerables.

getLayerManager

Returns the VFBLayerManager instance to which this layer manager belongs.

getLayerPropertiesCount

Returns the number of properties of the given layer.

getLayerPropertiesOfType

Gets a list of all properties of the layer which are of type “layerType”. One of these strings, case insensitive: * ‘Bool’ * ‘Int’ * ‘Float’ * ‘Color’ * ‘String’ * ‘StampFont’ - Holds a structure describing a font. * ‘StampString’ - Holds two strings - raw string with user entered text and one string with fields replaced.

getLayerPropertiesReadOnly

Gets a list of all properties of the layer which are read-only.

getLayerPropertyDisplayName

Returns the display name of a property the given layer.

getLayerPropertyFlags

Gets the flags of a given property as a list of strings. It can have values: * ‘Internal’ - No UI should be created in its “Properties” UI. * ‘Hidden’ - If this flag is raised the property should be temporarily hidden from its “Properties” UI. * ‘EnumRadioButtons’ - Specific to Int properties, the UI should use radio buttons. * ‘EnumComboBox’ - Specific to Int properties, the UI should use a combo box. * ‘Command’ - Specific to Int properties.The UI is just a button.Pressing it sets the current value.The value itself is used to enable / disable the button(value != 0 enables the button). * ‘HorizontalRolloutControls’ - Specifies that controls in the rollout should be horizontally next to each other instead of below each other.Horizontal UI will be different and some of the controls will have fewer controls. * ‘Transient’ - Parameter that is not stored in files. * ‘ReadOnly’ - Properties with this flag should be shown with a read only UI. * ‘CollapsibleVerticalRollout’ - Collapsible rollouts have buttons to collapse / expand them. * ‘ScrollableVerticalRollout’ - Scrollable rollouts will have their contents in a scroll area. * ‘NoCustomStyleTag’ - Properties with this flag will not have Q_PROPERTY for custom styling(e.g.horizontal_rollout_groupbox). * ‘NonResettable’ - Properties with this flag won’t be reset by calls to resetPropsToDefaults (e.g. Layer name). * ‘NoUndo’ - Properties with this flag don’t need undo on changes. Example calculated images, curves for now. * ‘Advanced’ - Indicate a property only visible when toggling advanced properties visibility / export mode or whatever similar. * ‘HasPipetteTool’ - Specific to Color property, add an additional pipette tool next to the color swatch button. * ‘Const’ - Properties marked as “Const” cannot have their internal value modified(i.e. const). * ‘WithoutLineEdit’ - Specific to string properties.Specifies that line editing is not wanted. * ‘Stretched’ - Specifies that when a widget is added it has to be stretched.

getLayerPropertyIntEnumValues

Gets a list with all the possible values (display string) of a given enum integer property.

getLayerPropertyNames

Returns a list with the name of each property of the given layer.

getLayerPropertyType

Gets a list of all properties of the layer which are of type “layerType”.

getOpacity

Gets layer opacity, if the layer is blendable.

getParent

Gets the of the parent layer of the given layer.

getUniqueTreePathID

Gets the unique path from the root layer to the current layer using their indices as children of their parent layer(indices from the list of children of the parent layer).

getUserName

Gets the user name of the given layer.

isLayerPropertyReadOnly

Returns true if the property is read-only and false otherwise.

isValid

Checks if a layer instance is valid, i.e. still part of the VFB layer tree.

resetLayerPropertyToDefault

Resets the given property to its default value.

setBlendMode

Gets layer blending mode, if the layer is blendable. Blend modes are available for all Color correction layers, Composite layers, folders, and multiple masks applied on a single layer or folder. When adding a new layer, it is placed on top of the stack and it is considered the foreground (FG). The result of all layers below it is considered the background (BG). Layers are applied from the bottom to the top. Where darker and lighter pixels are mentioned below, it is in relation to mid-grey. The available values are: * ‘BlendMode_Overwrite’ - Displays the current layer (FG) on top of all layers (BG) without blending. This is the default. * ‘BlendMode_Average’ - The average of the current layer (FG) and the result from the layers below it (BG). * ‘BlendMode_Add’ - Adds the FG to the BG. * ‘BlendMode_Subtract’ - Subtracts the FG from the BG. Does not affect completely black areas. * ‘BlendMode_Darken’ - Compares the FG to the BG and takes the darker pixel values of the two. * ‘BlendMode_Multiply’ - Multiplies the FG by the BG. * ‘BlendMode_ColorBurn’ - The color of the FG is applied to darker pixels in the BG. * ‘BlendMode_LinearBurn’ - Same as Color Burn but with less contrast. * ‘BlendMode_Lighten’ - Compares the FG to the BG and takes the lighter of the two. * ‘BlendMode_Screen’ - Makes both light and dark areas lighter. * ‘BlendMode_ColorDodge’ - Also known as ‘Color Dodge (8bit)’. The color of the FG is applied to lighter pixels in the BG. * ‘BlendMode_LinearDodge’ - Also known as ‘Linear Dodge (8bit)’. Same as Color Dodge but with less contrast. * ‘BlendMode_Spotlight’ - Also known as ‘Spotlight (8bit)’. Same as Multiply, but with twice the brightness. * ‘BlendMode_SplotlightBlend’ - Also known as ‘Spotlight Blend (8bit)’. Same as Spotlight, but additionally brightens the BG. * ‘BlendMode_Overlay’ - Also known as ‘Overlay (8bit)’. Darker pixels become darker where the BG is dark and brighter pixels become brighter where the BG is bright. * ‘BlendMode_Softlight’ - Also known as ‘Soft Light (8bit)’. Darker pixels become darker where the FG is dark and brighter pixels become brighter where the FG is bright. * ‘BlendMode_Hardlight’ - Also known as ‘Hard Light (8bit)’. Spotlight is applied to pixels where the FG is dark and Screen is applied to pixels where the FG is bright. * ‘BlendMode_Pinlight’ - Replaces the BG colors depending on the brightness of the FG color. If the FG color is lighter than mid-gray, BG colors darker than the FG color are replaced and vice versa. * ‘BlendMode_Hardmix’ - Also known as ‘Hard Mix (8bit)’. Adds the FG to the BG and for each color component returns a value of 255 if the result is 255 or greater, or returns 0 if the result is less than 255. * ‘BlendMode_Difference’ - Compares the pixels in the BG and FG and subtracts the darker pixels from the brighter ones. * ‘BlendMode_Exclusion’ - Same as Difference but with less contrast. * ‘BlendMode_Hue’ - Uses the hue from the FG, while the value and saturation are taken from the BG. * ‘BlendMode_Saturation’ - Uses the saturation from the FG, while the value and hue are taken from the BG. * ‘BlendMode_Color’ - Uses the hue and saturation from the FG, while the value is taken from the BG. * ‘BlendMode_Value’ - Uses the value from the FG, while the hue and saturation are taken from the BG. * ‘BlendMode_Divide’ - Subtracts the BG from the FG. Dark areas of the render are brightened, while bright areas of the render are not changed significantly. Does not affect completely white areas. * ‘BlendMode_Normal’ - Blends the alpha of the <code>VRayMtlSelect</code> render element’s material and other layers. * ‘BlendMode_Background’ - Use as background. * ‘BlendMode_Foreground’ - Use as foreground. * ‘BlendMode_FgWhiteMask’ - Special mode used when masking the input of some layer. It will treat the Fg as a mask and if it is white (> 0.99) will get the Bg color. Otherwise - black.

setEnabled

Sets whether the layer is enabled.

setOpacity

Sets layer opacity, if the layer is blendable.

setUserName

Sets the user name of the given layer.

canBlend()

Checks if a layer can be blended.

canDelete()

Checks if a layer can be deleted by the user.

getBlendMode()

Gets layer blending mode, if the layer is blendable. Blend modes are available for all Color correction layers, Composite layers, folders, and multiple masks applied on a single layer or folder. When adding a new layer, it is placed on top of the stack and it is considered the foreground (FG). The result of all layers below it is considered the background (BG). Layers are applied from the bottom to the top. Where darker and lighter pixels are mentioned below, it is in relation to mid-grey. The available values are:

  • ‘BlendMode_Overwrite’ - Displays the current layer (FG) on top of all layers (BG) without blending. This is the default.

  • ‘BlendMode_Average’ - The average of the current layer (FG) and the result from the layers below it (BG).

  • ‘BlendMode_Add’ - Adds the FG to the BG.

  • ‘BlendMode_Subtract’ - Subtracts the FG from the BG. Does not affect completely black areas.

  • ‘BlendMode_Darken’ - Compares the FG to the BG and takes the darker pixel values of the two.

  • ‘BlendMode_Multiply’ - Multiplies the FG by the BG.

  • ‘BlendMode_ColorBurn’ - The color of the FG is applied to darker pixels in the BG.

  • ‘BlendMode_LinearBurn’ - Same as Color Burn but with less contrast.

  • ‘BlendMode_Lighten’ - Compares the FG to the BG and takes the lighter of the two.

  • ‘BlendMode_Screen’ - Makes both light and dark areas lighter.

  • ‘BlendMode_ColorDodge’ - Also known as ‘Color Dodge (8bit)’. The color of the FG is applied to lighter pixels in the BG.

  • ‘BlendMode_LinearDodge’ - Also known as ‘Linear Dodge (8bit)’. Same as Color Dodge but with less contrast.

  • ‘BlendMode_Spotlight’ - Also known as ‘Spotlight (8bit)’. Same as Multiply, but with twice the brightness.

  • ‘BlendMode_SplotlightBlend’ - Also known as ‘Spotlight Blend (8bit)’. Same as Spotlight, but additionally brightens the BG.

  • ‘BlendMode_Overlay’ - Also known as ‘Overlay (8bit)’. Darker pixels become darker where the BG is dark and brighter pixels become brighter where the BG is bright.

  • ‘BlendMode_Softlight’ - Also known as ‘Soft Light (8bit)’. Darker pixels become darker where the FG is dark and brighter pixels become brighter where the FG is bright.

  • ‘BlendMode_Hardlight’ - Also known as ‘Hard Light (8bit)’. Spotlight is applied to pixels where the FG is dark and Screen is applied to pixels where the FG is bright.

  • ‘BlendMode_Pinlight’ - Replaces the BG colors depending on the brightness of the FG color. If the FG color is lighter than mid-gray, BG colors darker than the FG color are replaced and vice versa.

  • ‘BlendMode_Hardmix’ - Also known as ‘Hard Mix (8bit)’. Adds the FG to the BG and for each color component returns a value of 255 if the result is 255 or greater, or returns 0 if the result is less than 255.

  • ‘BlendMode_Difference’ - Compares the pixels in the BG and FG and subtracts the darker pixels from the brighter ones.

  • ‘BlendMode_Exclusion’ - Same as Difference but with less contrast.

  • ‘BlendMode_Hue’ - Uses the hue from the FG, while the value and saturation are taken from the BG.

  • ‘BlendMode_Saturation’ - Uses the saturation from the FG, while the value and hue are taken from the BG.

  • ‘BlendMode_Color’ - Uses the hue and saturation from the FG, while the value is taken from the BG.

  • ‘BlendMode_Value’ - Uses the value from the FG, while the hue and saturation are taken from the BG.

  • ‘BlendMode_Divide’ - Subtracts the BG from the FG. Dark areas of the render are brightened, while bright areas of the render are not changed significantly. Does not affect completely white areas.

  • ‘BlendMode_Normal’ - Blends the alpha of the <code>VRayMtlSelect</code> render element’s material and other layers.

  • ‘BlendMode_Background’ - Use as background.

  • ‘BlendMode_Foreground’ - Use as foreground.

  • ‘BlendMode_FgWhiteMask’ - Special mode used when masking the input of some layer. It will treat the Fg as a mask and if it is white (> 0.99) will get the Bg color. Otherwise - black.

getChild()

Returns the specific child of the layer.

  • childIndex, integer - The index of the child in the list of children of the layer.

getChildren()

Returns a list of the children of the layer.

getChildrenCount()

Returns number of children of the layer.

getClass()

Get the layer class.

getEnabled()

Returns true if the layer is enabled.

getIntegerID()

Returns the ID of the layer instance. The ID is unique per layer manager contained in a VFB instance. WARNING: It does not verify the validity of the layer! Layers can become invalid (e.g., after a loadAllLayers usage), and not always is the change propagated on time to these handles. For that, use the isValid method.

getLayerEnumProperties()

Gets a list of all properties of the layer which are integer enumerables.

getLayerManager()

Returns the VFBLayerManager instance to which this layer manager belongs.

getLayerPropertiesCount()

Returns the number of properties of the given layer.

getLayerPropertiesOfType()

Gets a list of all properties of the layer which are of type “layerType”. One of these strings, case insensitive:

  • ‘Bool’

  • ‘Int’

  • ‘Float’

  • ‘Color’

  • ‘String’

  • ‘StampFont’ - Holds a structure describing a font.

  • ‘StampString’ - Holds two strings - raw string with user entered text and one string with fields replaced.

  • layerType, string - The type by which the layer properties will be filtered by.

getLayerPropertiesReadOnly()

Gets a list of all properties of the layer which are read-only.

getLayerPropertyDisplayName()

Returns the display name of a property the given layer.

  • propertyName, string - The name of the property.

getLayerPropertyFlags()

Gets the flags of a given property as a list of strings. It can have values:

  • ‘Internal’ - No UI should be created in its “Properties” UI.

  • ‘Hidden’ - If this flag is raised the property should be temporarily hidden from its “Properties” UI.

  • ‘EnumRadioButtons’ - Specific to Int properties, the UI should use radio buttons.

  • ‘EnumComboBox’ - Specific to Int properties, the UI should use a combo box.

  • ‘Command’ - Specific to Int properties.The UI is just a button.Pressing it sets the current value.The value itself is used to enable / disable the button(value != 0 enables the button).

  • ‘HorizontalRolloutControls’ - Specifies that controls in the rollout should be horizontally next to each other instead of below each other.Horizontal UI will be different and some of the controls will have fewer controls.

  • ‘Transient’ - Parameter that is not stored in files.

  • ‘ReadOnly’ - Properties with this flag should be shown with a read only UI.

  • ‘CollapsibleVerticalRollout’ - Collapsible rollouts have buttons to collapse / expand them.

  • ‘ScrollableVerticalRollout’ - Scrollable rollouts will have their contents in a scroll area.

  • ‘NoCustomStyleTag’ - Properties with this flag will not have Q_PROPERTY for custom styling(e.g.horizontal_rollout_groupbox).

  • ‘NonResettable’ - Properties with this flag won’t be reset by calls to resetPropsToDefaults (e.g. Layer name).

  • ‘NoUndo’ - Properties with this flag don’t need undo on changes. Example calculated images, curves for now.

  • ‘Advanced’ - Indicate a property only visible when toggling advanced properties visibility / export mode or whatever similar.

  • ‘HasPipetteTool’ - Specific to Color property, add an additional pipette tool next to the color swatch button.

  • ‘Const’ - Properties marked as “Const” cannot have their internal value modified(i.e. const).

  • ‘WithoutLineEdit’ - Specific to string properties.Specifies that line editing is not wanted.

  • ‘Stretched’ - Specifies that when a widget is added it has to be stretched.

  • propertyName, string - The name of the property.

getLayerPropertyIntEnumValues()

Gets a list with all the possible values (display string) of a given enum integer property.

  • propertyName, string - The name of the property.

getLayerPropertyNames()

Returns a list with the name of each property of the given layer.

getLayerPropertyType()

Gets a list of all properties of the layer which are of type “layerType”.

  • propertyName, string - The name of the property.

getOpacity()

Gets layer opacity, if the layer is blendable.

getParent()

Gets the of the parent layer of the given layer.

getUniqueTreePathID()

Gets the unique path from the root layer to the current layer using their indices as children of their parent layer(indices from the list of children of the parent layer). E.g. ‘/0/1/0/4’ corresponds to root.getChild(0).getChild(1).getChild(0).getChild(4).

getUserName()

Gets the user name of the given layer.

isLayerPropertyReadOnly()

Returns true if the property is read-only and false otherwise.

  • propertyName, string - The name of the property.

isValid()

Checks if a layer instance is valid, i.e. still part of the VFB layer tree.

resetLayerPropertyToDefault()

Resets the given property to its default value.

setBlendMode()

Gets layer blending mode, if the layer is blendable. Blend modes are available for all Color correction layers, Composite layers, folders, and multiple masks applied on a single layer or folder. When adding a new layer, it is placed on top of the stack and it is considered the foreground (FG). The result of all layers below it is considered the background (BG). Layers are applied from the bottom to the top. Where darker and lighter pixels are mentioned below, it is in relation to mid-grey. The available values are:

  • ‘BlendMode_Overwrite’ - Displays the current layer (FG) on top of all layers (BG) without blending. This is the default.

  • ‘BlendMode_Average’ - The average of the current layer (FG) and the result from the layers below it (BG).

  • ‘BlendMode_Add’ - Adds the FG to the BG.

  • ‘BlendMode_Subtract’ - Subtracts the FG from the BG. Does not affect completely black areas.

  • ‘BlendMode_Darken’ - Compares the FG to the BG and takes the darker pixel values of the two.

  • ‘BlendMode_Multiply’ - Multiplies the FG by the BG.

  • ‘BlendMode_ColorBurn’ - The color of the FG is applied to darker pixels in the BG.

  • ‘BlendMode_LinearBurn’ - Same as Color Burn but with less contrast.

  • ‘BlendMode_Lighten’ - Compares the FG to the BG and takes the lighter of the two.

  • ‘BlendMode_Screen’ - Makes both light and dark areas lighter.

  • ‘BlendMode_ColorDodge’ - Also known as ‘Color Dodge (8bit)’. The color of the FG is applied to lighter pixels in the BG.

  • ‘BlendMode_LinearDodge’ - Also known as ‘Linear Dodge (8bit)’. Same as Color Dodge but with less contrast.

  • ‘BlendMode_Spotlight’ - Also known as ‘Spotlight (8bit)’. Same as Multiply, but with twice the brightness.

  • ‘BlendMode_SplotlightBlend’ - Also known as ‘Spotlight Blend (8bit)’. Same as Spotlight, but additionally brightens the BG.

  • ‘BlendMode_Overlay’ - Also known as ‘Overlay (8bit)’. Darker pixels become darker where the BG is dark and brighter pixels become brighter where the BG is bright.

  • ‘BlendMode_Softlight’ - Also known as ‘Soft Light (8bit)’. Darker pixels become darker where the FG is dark and brighter pixels become brighter where the FG is bright.

  • ‘BlendMode_Hardlight’ - Also known as ‘Hard Light (8bit)’. Spotlight is applied to pixels where the FG is dark and Screen is applied to pixels where the FG is bright.

  • ‘BlendMode_Pinlight’ - Replaces the BG colors depending on the brightness of the FG color. If the FG color is lighter than mid-gray, BG colors darker than the FG color are replaced and vice versa.

  • ‘BlendMode_Hardmix’ - Also known as ‘Hard Mix (8bit)’. Adds the FG to the BG and for each color component returns a value of 255 if the result is 255 or greater, or returns 0 if the result is less than 255.

  • ‘BlendMode_Difference’ - Compares the pixels in the BG and FG and subtracts the darker pixels from the brighter ones.

  • ‘BlendMode_Exclusion’ - Same as Difference but with less contrast.

  • ‘BlendMode_Hue’ - Uses the hue from the FG, while the value and saturation are taken from the BG.

  • ‘BlendMode_Saturation’ - Uses the saturation from the FG, while the value and hue are taken from the BG.

  • ‘BlendMode_Color’ - Uses the hue and saturation from the FG, while the value is taken from the BG.

  • ‘BlendMode_Value’ - Uses the value from the FG, while the hue and saturation are taken from the BG.

  • ‘BlendMode_Divide’ - Subtracts the BG from the FG. Dark areas of the render are brightened, while bright areas of the render are not changed significantly. Does not affect completely white areas.

  • ‘BlendMode_Normal’ - Blends the alpha of the <code>VRayMtlSelect</code> render element’s material and other layers.

  • ‘BlendMode_Background’ - Use as background.

  • ‘BlendMode_Foreground’ - Use as foreground.

  • ‘BlendMode_FgWhiteMask’ - Special mode used when masking the input of some layer. It will treat the Fg as a mask and if it is white (> 0.99) will get the Bg color. Otherwise - black.

  • blendMode, string - The blend mode of the layer.

setEnabled()

Sets whether the layer is enabled.

  • enabled, boolean - The new enabled state of the layer.

setOpacity()

Sets layer opacity, if the layer is blendable.

  • opacity, number - The opacity of the layer.

setUserName()

Sets the user name of the given layer.

  • userName, string - The user name of the layer.