GreasePencilLayer(GreasePencilTreeNode)

base classes — bpy_struct, GreasePencilTreeNode

class bpy.types.GreasePencilLayer(GreasePencilTreeNode)

Collection of related drawings

blend_mode

Blend mode (default 'REGULAR')

Type:

Literal[‘REGULAR’, ‘HARDLIGHT’, ‘ADD’, ‘SUBTRACT’, ‘MULTIPLY’, ‘DIVIDE’]

frames

Grease Pencil frames (default None, readonly)

Type:

GreasePencilFrames[GreasePencilFrame]

ignore_locked_materials

Allow editing strokes even if they use locked materials (default False)

Type:

bool

lock_frame

Lock current frame displayed by layer (default False)

Type:

bool

mask_layers

List of Masking Layers (default None, readonly)

Type:

GreasePencilLayerMasks[GreasePencilLayerMask]

matrix_local

Local transformation matrix of the layer (multi-dimensional array of 4 * 4 items, in [-inf, inf], default ((0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), readonly)

Type:

mathutils.Matrix

matrix_parent_inverse

Inverse of layer’s parent transformation matrix (multi-dimensional array of 4 * 4 items, in [-inf, inf], default ((0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), readonly)

Type:

mathutils.Matrix

opacity

Layer Opacity (in [0, 1], default 0.0)

Type:

float

parent

Parent object

Type:

Object

parent_bone

Name of parent bone. Only used when the parent object is an armature. (default “”, never None)

Type:

str

pass_index

Index number for the “Layer Index” pass (in [0, inf], default 0)

Type:

int

radius_offset

Radius change to apply to current strokes (in [-inf, inf], default 0.0)

Type:

float

rotation

Euler rotation of the layer (array of 3 items, in [-inf, inf], default (0.0, 0.0, 0.0))

Type:

mathutils.Euler

scale

Scale of the layer (array of 3 items, in [-inf, inf], default (1.0, 1.0, 1.0))

Type:

mathutils.Vector

tint_color

Color for tinting stroke colors (array of 3 items, in [0, 1], default (0.0, 0.0, 0.0))

Type:

mathutils.Color

tint_factor

Factor of tinting color (in [0, 1], default 0.0)

Type:

float

translation

Translation of the layer (array of 3 items, in [-inf, inf], default (0.0, 0.0, 0.0))

Type:

mathutils.Vector

use_lights

Enable the use of lights on stroke and fill materials (default False)

Type:

bool

use_viewlayer_masks

Include the mask layers when rendering the view-layer (default True)

Type:

bool

viewlayer_render

Only include Layer in this View Layer render output (leave blank to include always) (default “”, never None)

Type:

str

get_frame_at(frame_number)

Get the frame at given frame number

Parameters:

frame_number (int) – Frame Number, (in [-1048574, 1048574])

Returns:

Frame

Return type:

GreasePencilFrame

current_frame()

The Grease Pencil frame at the current scene time on this layer

Return type:

GreasePencilFrame

classmethod bl_rna_get_subclass(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (bpy.types.Struct | None) – The value to return when not found.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (type | None) – The value to return when not found.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References