2.11. LayerGroup¶
2.11.1. Synopsis¶
2.11.1.1. Functions¶
def
__eq__
(group)def
find_layers
(name)def
insert_child
(layer[, index=0])def
parameter
(name_components)def
parameter_set
([name_components=list()])
2.11.1.2. Properties¶
property
locked
[read-write] of boolproperty
matte_color
[read-write] of 3-items tuple of float values in range [0.0…1.0]property
name
[read-write] of strproperty
psets
[read-only] of ParameterSetproperty
stroke_color
[read-write] of 3-items tuple of float values in range [0.0…1.0]property
visibility
[read-write] of boolproperty
z_order
[read-write] of int
2.11.2. Detailed Description¶
Layer class which exposes primary layer group operations.
-
class
mocha.project.
LayerGroup
¶
-
LayerGroup.
find_layers
(name)¶ - Return type
list of Layer
- Parameters
name (str) – Layer name to search.
Returns all layers in the group with given name from this group.
-
LayerGroup.
insert_child
(layer[, index=0])¶ - Parameters
layer (Layer) – Layer instance which will be inserted to this group.
index (uint) – Insertion index.
The same as
Layer.set_parent()
.
-
LayerGroup.
__eq__
(group)¶ - Return type
bool
-
LayerGroup.
parameter
(name_components)¶ - Return type
- Parameters
name_components (list of strings) – Relative name for a requested parameter.
Returns
Parameter
instance bound with given name path.
-
LayerGroup.
parameter_set
([name_components=list()])¶ - Return type
- Parameters
name_components (list of strings) – Relative name for a requested parameter set.
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.
-
LayerGroup.
psets
¶ - Type
- Access
read-only Provides access to the root parameter set.
Mimics parameter_set() call.