Gpencil Operators#
- bpy.ops.gpencil.annotate(*, mode='DRAW', arrowstyle_start='NONE', arrowstyle_end='NONE', use_stabilizer=False, stabilizer_factor=0.75, stabilizer_radius=35, stroke=None, wait_for_input=True)#
Make annotations on the active data
- Parameters:
mode (enum in ['DRAW', 'DRAW_STRAIGHT', 'DRAW_POLY', 'ERASER'], (optional)) –
Mode, Way to interpret mouse movements
DRAW
Draw Freehand – Draw freehand stroke(s).DRAW_STRAIGHT
Draw Straight Lines – Draw straight line segment(s).DRAW_POLY
Draw Poly Line – Click to place endpoints of straight line segments (connected).ERASER
Eraser – Erase Annotation strokes.
arrowstyle_start (enum in ['NONE', 'ARROW', 'ARROW_OPEN', 'ARROW_OPEN_INVERTED', 'DIAMOND'], (optional)) –
Start Arrow Style, Stroke start style
NONE
None – Don’t use any arrow/style in corner.ARROW
Arrow – Use closed arrow style.ARROW_OPEN
Open Arrow – Use open arrow style.ARROW_OPEN_INVERTED
Segment – Use perpendicular segment style.DIAMOND
Square – Use square style.
arrowstyle_end (enum in ['NONE', 'ARROW', 'ARROW_OPEN', 'ARROW_OPEN_INVERTED', 'DIAMOND'], (optional)) –
End Arrow Style, Stroke end style
NONE
None – Don’t use any arrow/style in corner.ARROW
Arrow – Use closed arrow style.ARROW_OPEN
Open Arrow – Use open arrow style.ARROW_OPEN_INVERTED
Segment – Use perpendicular segment style.DIAMOND
Square – Use square style.
use_stabilizer (boolean, (optional)) – Stabilize Stroke, Helper to draw smooth and clean lines. Press Shift for an invert effect (even if this option is not active)
stabilizer_factor (float in [0, 1], (optional)) – Stabilizer Stroke Factor, Higher values gives a smoother stroke
stabilizer_radius (int in [0, 200], (optional)) – Stabilizer Stroke Radius, Minimum distance from last point before stroke continues
stroke (
bpy_prop_collection
ofOperatorStrokeElement
, (optional)) – Strokewait_for_input (boolean, (optional)) – Wait for Input, Wait for first click instead of painting immediately
- bpy.ops.gpencil.annotation_active_frame_delete()#
Delete the active frame for the active Annotation Layer
- bpy.ops.gpencil.annotation_add()#
Add new Annotation data-block
- bpy.ops.gpencil.data_unlink()#
Unlink active Annotation data-block
- bpy.ops.gpencil.layer_annotation_add()#
Add new Annotation layer or note for the active data-block
- bpy.ops.gpencil.layer_annotation_move(*, type='UP')#
Move the active Annotation layer up/down in the list
- Parameters:
type (enum in ['UP', 'DOWN'], (optional)) – Type
- bpy.ops.gpencil.layer_annotation_remove()#
Remove active Annotation layer
- bpy.ops.gpencil.tint_flip()#
Switch tint colors