2.9. LayerGroup

2.9.1. Synopsis

2.9.1.1. Functions

2.9.1.2. Properties

  • property layers [read-only] of list of Layer instances
  • property locked [read-write] of bool
  • property matte_color [read-write] of 3-items tuple of float values in range [0.0...1.0]
  • property name [read-write] of str
  • property stroke_color [read-write] of 3-items tuple of float values in range [0.0...1.0]
  • property visibility [read-write] of bool
  • property z_order [read-write] of int

2.9.2. Detailed Description

Layer class which exposes primary layer group operations.
class mocha.project.LayerGroup(LayerGroup)
LayerGroup.find_layers(name)
Return type:list of Layer
Parameters:name (unicode) – Layer name to search.

Returns all layers in the group with given name from this group.

LayerGroup.insert_child(layer[, index=0])
Parameters:
  • layer (mocha.project.Layer) – Layer instance which will be inserted to this group.
  • index (PySide2.QtCore.uint) – Insertion index.

The same as Layer.set_parent().

LayerGroup.__eq__(group)
Return type:PySide2.QtCore.bool
LayerGroup.parameter(name_components)
Return type:mocha.project.Parameter
Parameters:name_components (list of strings) – Relative name for a requested parameter.
Return type:Parameter

Returns Parameter instance bound with given name path.

LayerGroup.parameter_set([name_components=list()])
Return type:mocha.project.ParameterSet
Parameters:name_components (list of strings) – Relative name for a requested parameter set.
Return type:ParameterSet

Returns ParameterSet instance bound with given name path. Pass an empty list [] to get access to the LayerGroup parameters set.

LayerGroup.name
Type:str
Access:read-write

Provides access to group name.

LayerGroup.layers
Type:list of Layer instances
Access:read-only

Provides read-only access to list of all layers, sorted in increasing depth order (i.e. top to bottom).

LayerGroup.visibility
Type:bool
Access:read-write

Provides access to group visibility.

LayerGroup.matte_color
Type:3-items tuple of float values in range [0.0...1.0]
Access:read-write

Provides access to group matte color.

LayerGroup.stroke_color
Type:3-items tuple of float values in range [0.0...1.0]
Access:read-write

Provides access to group stroke color.

LayerGroup.locked
Type:bool
Access:read-write

Provides access to layer group locked state.

LayerGroup.z_order
Type:int
Access:read-write

Provides access to Z order value.