Gpencil Operators

bpy.ops.gpencil.active_frame_delete()

Delete the active frame for the active Grease Pencil datablock

bpy.ops.gpencil.convert(type='PATH')

Convert the active Grease Pencil layer to a new Object

Parameters:
  • type (enum in [‘PATH’, ‘CURVE’], (optional)) – Type
bpy.ops.gpencil.data_add()

Add new Grease Pencil datablock

Unlink active Grease Pencil datablock

bpy.ops.gpencil.draw(mode='DRAW', stroke=None)

Make annotations on the active data

Parameters:
  • mode (enum in [‘DRAW’, ‘DRAW_STRAIGHT’, ‘ERASER’], (optional)) – Mode, Way to intepret mouse movements.
  • stroke (Collection of OperatorStrokeElement, (optional)) – Stroke
bpy.ops.gpencil.layer_add()

Add new Grease Pencil layer for the active Grease Pencil datablock

Previous topic

Font Operators

Next topic

Graph Operators