# GPencilLayer(bpy_struct)

base class — `bpy_struct`

class `bpy.types.``GPencilLayer`(bpy_struct)

  Collection of related sketches

  `active_frame`

    Frame currently being displayed for this layer

    Type: | `GPencilFrame`, (readonly)

  `after_color`

    Base color for ghosts after the active frame

    Type: | float array of 3 items in [0, 1], default (0.0, 0.0, 0.0)

  `alpha`

    Layer Opacity

    Type: | float in [0, 1], default 0.0

  `before_color`

    Base color for ghosts before the active frame

    Type: | float array of 3 items in [0, 1], default (0.0, 0.0, 0.0)

  `color`

    Color for all strokes in this layer

    Type: | float array of 3 items in [0, 1], default (0.0, 0.0, 0.0)

  `fill_alpha`

    Opacity for filling region bounded by each stroke

    Type: | float in [0, 1], default 0.0

  `fill_color`

    Color for filling region bounded by each stroke

    Type: | float array of 3 items in [0, 1], default (0.0, 0.0, 0.0)

  `frames`

    Sketches for this layer on different frames

    Type: | `GPencilFrames` `bpy_prop_collection` of `GPencilFrame`, (readonly)

  `ghost_after_range`

    Maximum number of frames to show after current frame (0 = show only the next sketch)

    Type: | int in [0, 120], default 0

  `ghost_before_range`

    Maximum number of frames to show before current frame (0 = show only the previous sketch)

    Type: | int in [0, 120], default 0

  `hide`

    Set layer Visibility

    Type: | boolean, default False

  `info`

    Layer name

    Type: | string, default “”, (never None)

  `is_fill_visible`

    True when opacity of fill is set high enough to be visible

    Type: | boolean, default False, (readonly)

  `is_stroke_visible`

    True when opacity of stroke is set high enough to be visible

    Type: | boolean, default False, (readonly)

  `line_width`

    Thickness of strokes (in pixels)

    Type: | int in [-32768, 32767], default 0

  `lock`

    Protect layer from further editing and/or frame changes

    Type: | boolean, default False

  `lock_frame`

    Lock current frame displayed by layer

    Type: | boolean, default False

  `select`

    Layer is selected for editing in the Dope Sheet

    Type: | boolean, default False

  `show_points`

    Draw the points which make up the strokes (for debugging purposes)

    Type: | boolean, default False

  `show_x_ray`

    Make the layer draw in front of objects

    Type: | boolean, default False

  `use_ghost_custom_colors`

    Use custom colors for ghost frames

    Type: | boolean, default False

  `use_onion_skinning`

    Ghost frames on either side of frame

    Type: | boolean, default False

  `use_volumetric_strokes`

    Draw strokes as a series of circular blobs, resulting in a volumetric effect

    Type: | boolean, default False

  `clear`()

    Remove all the grease pencil layer data

Inherited Properties

`bpy_struct.id_data` |

Inherited Functions

`bpy_struct.as_pointer` `bpy_struct.driver_add` `bpy_struct.driver_remove` `bpy_struct.get` `bpy_struct.is_property_hidden` `bpy_struct.is_property_readonly` `bpy_struct.is_property_set` `bpy_struct.items` | `bpy_struct.keyframe_delete` `bpy_struct.keyframe_insert` `bpy_struct.keys` `bpy_struct.path_from_id` `bpy_struct.path_resolve` `bpy_struct.property_unset` `bpy_struct.type_recast` `bpy_struct.values`

References

`bpy.context.active_gpencil_layer` `bpy.context.editable_gpencil_layers` `bpy.context.visible_gpencil_layers` `GreasePencil.layers` | `GreasePencilLayers.active` `GreasePencilLayers.new` `GreasePencilLayers.remove`