Blender  V3.3
gpencil_intern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2009 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "DNA_vec_types.h"
11 
12 #include "ED_numinput.h"
13 
14 #define DEPTH_INVALID 1.0f
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /* internal exports only */
21 struct Material;
22 struct bGPDspoint;
23 struct bGPDstroke;
24 struct bGPdata;
25 struct tGPspoint;
26 
27 struct GHash;
28 struct RNG;
29 
30 struct ARegion;
31 struct Brush;
32 struct Scene;
33 struct View2D;
34 struct View3D;
35 struct wmOperatorType;
36 
37 struct Depsgraph;
38 
39 struct EnumPropertyItem;
40 struct PointerRNA;
41 struct PropertyRNA;
42 
43 /* ***************************************************** */
44 /* Modal Operator Geometry Preview
45  *
46  * Several modal operators (Fill, Interpolate, Primitive)
47  * need to run some drawing code to display previews, or
48  * to perform screen-space/image-based analysis routines.
49  * The following structs + function prototypes are used
50  * by these operators so that the operator code
51  * (in gpencil_<opname>.c) can communicate with the drawing
52  * code (in drawgpencil.c).
53  *
54  * NOTE: All this is within the gpencil module, so nothing needs
55  * to be exported to other modules.
56  */
57 
58 /* Internal Operator-State Data ------------------------ */
59 
61 typedef struct GpRandomSettings {
63  float pen_press;
64 
65  float hsv[3];
66  float pressure;
67  float strength;
68  float uv;
70 
71 /* Temporary draw data (no draw manager mode) */
72 typedef struct tGPDdraw {
73  struct RegionView3D *rv3d; /* region to draw */
74  struct Depsgraph *depsgraph; /* depsgraph */
75  struct Object *ob; /* GP object */
76  struct bGPdata *gpd; /* current GP datablock */
77  struct bGPDlayer *gpl; /* layer */
78  struct bGPDframe *gpf; /* frame */
79  struct bGPDframe *t_gpf; /* temporal frame */
80  struct bGPDstroke *gps; /* stroke */
81  int disable_fill; /* disable fill */
82  int offsx; /* windows offset x */
83  int offsy; /* windows offset y */
84  int winx; /* windows width */
85  int winy; /* windows height */
86  int dflag; /* flags datablock */
87  short lthick; /* layer thickness */
88  float opacity; /* opacity */
89  float tintcolor[4]; /* tint color */
90  bool onion; /* onion flag */
91  bool custonion; /* use custom onion colors */
92  bool is_fill_stroke; /* use fill tool */
93  float diff_mat[4][4]; /* matrix */
95 
96 /* Modal Operator Drawing Callbacks ------------------------ */
97 
101 void ED_gpencil_draw_fill(struct tGPDdraw *tgpw);
102 
103 /* ***************************************************** */
104 /* Internal API */
105 
106 /* Stroke Coordinates API ------------------------------ */
107 /* gpencil_utils.c */
108 
109 typedef struct GP_SpaceConversion {
110  struct Scene *scene;
111  struct Object *ob;
112  struct bGPdata *gpd;
113  struct bGPDlayer *gpl;
114 
115  struct ScrArea *area;
116  struct ARegion *region;
117  struct View2D *v2d;
118 
119  rctf *subrect; /* for using the camera rect within the 3d view */
121 
122  float mat[4][4]; /* transform matrix on the strokes (introduced in [b770964]) */
124 
125 /* Temporary primitive operation data */
126 typedef struct tGPDprimitive {
128  struct Main *bmain;
131  struct wmWindow *win;
133  struct Scene *scene;
135  struct Object *ob;
137  struct Object *ob_eval;
139  struct ScrArea *area;
143  struct View3D *v3d;
145  struct ARegion *region;
147  struct bGPdata *gpd;
151  struct Brush *brush;
154 
157 
159  int cframe;
161  struct bGPDlayer *gpl;
163  struct bGPDframe *gpf;
165  int type;
169  bool curve;
175  short flip;
181  int subdiv;
187  float move[2];
189  float origin[2];
191  float start[2];
193  float end[2];
195  float midpoint[2];
197  float cp1[2];
199  float cp2[2];
201  int sel_cp;
203  int flag;
207  float mval[2];
209  float mvalo[2];
210 
213  struct RNG *rng;
214 
217 
219  float totpixlen;
220 
223 
225 
235 bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1);
236 
243 
254  const struct bGPDstroke *gps,
255  const struct bGPDspoint *pt,
256  int *r_x,
257  int *r_y);
258 
273  const bGPDstroke *gps,
274  const bGPDspoint *pt,
275  float *r_x,
276  float *r_y);
277 
286  const float diff_mat[4][4],
287  bGPDspoint *r_pt);
295  struct Object *obact,
296  bGPDlayer *gpl,
297  bGPDstroke *gps);
305  struct Object *obact,
306  bGPDlayer *gpl,
307  bGPDspoint *pt);
308 
313  short flag,
314  const float pt[3],
315  float xy[2]);
316 
333  struct Scene *scene,
334  const float screen_co[2],
335  float r_out[3]);
336 
337 /* helper to convert 2d to 3d */
338 
348  struct ARegion *region,
349  struct Object *ob,
350  const struct tGPspoint *point2D,
351  float *depth,
352  float r_out[3]);
353 
354 /* Poll Callbacks ------------------------------------ */
355 /* gpencil_utils.c */
356 
360 bool gpencil_add_poll(struct bContext *C);
364 bool gpencil_active_layer_poll(struct bContext *C);
368 bool gpencil_active_brush_poll(struct bContext *C);
370 
371 /* Copy/Paste Buffer --------------------------------- */
372 /* gpencil_edit.c */
373 
380 
381 /* Build a map for converting between old color-names and destination-color-refs. */
387 
388 /* Stroke Editing ------------------------------------ */
389 
394 
401 void gpencil_subdivide_stroke(bGPdata *gpd, bGPDstroke *gps, int subdivide);
402 
403 /* Layers Enums -------------------------------------- */
404 
409  struct PointerRNA *ptr,
410  struct PropertyRNA *prop,
411  bool *r_free);
416  struct PointerRNA *ptr,
417  struct PropertyRNA *prop,
418  bool *r_free);
423  struct PointerRNA *ptr,
424  struct PropertyRNA *prop,
425  bool *r_free);
426 
427 /* ***************************************************** */
428 /* Operator Defines */
429 
430 /* annotations ------ */
431 
433 
434 /* drawing ---------- */
435 
436 void GPENCIL_OT_draw(struct wmOperatorType *ot);
437 void GPENCIL_OT_fill(struct wmOperatorType *ot);
438 
439 /* Vertex Paint. */
446 
447 /* Guides ----------------------- */
448 
450 
451 /* Paint Modes for operator */
452 typedef enum eGPencil_PaintModes {
459 
460 /* chunk size for gp-session buffer (the total size is a multiple of this number) */
461 #define GP_STROKE_BUFFER_CHUNK 2048
462 
463 /* stroke editing ----- */
464 
472 
473 void GPENCIL_OT_select(struct wmOperatorType *ot);
478 
488 
490 void GPENCIL_OT_delete(struct wmOperatorType *ot);
492 void GPENCIL_OT_copy(struct wmOperatorType *ot);
493 void GPENCIL_OT_paste(struct wmOperatorType *ot);
494 void GPENCIL_OT_extrude(struct wmOperatorType *ot);
495 
499 
503 
506 
507 /* stroke editcurve */
508 
511 
512 /* stroke sculpting -- */
513 
519 
520 /* buttons editing --- */
521 
524 
533 
537 
538 void GPENCIL_OT_hide(struct wmOperatorType *ot);
539 void GPENCIL_OT_reveal(struct wmOperatorType *ot);
540 
543 
546 
548 
556 
557 void GPENCIL_OT_convert(struct wmOperatorType *ot);
560 
563 
564 enum {
567 };
568 
569 enum {
576 };
577 
578 enum {
581 };
582 
611 
614 
617 
620 
621 /* undo stack ---------- */
622 
623 void gpencil_undo_init(struct bGPdata *gpd);
624 void gpencil_undo_push(struct bGPdata *gpd);
625 void gpencil_undo_finish(void);
626 
627 /* interpolation ---------- */
628 
632 
633 /* primitives ---------- */
634 
640 
641 /* vertex groups ------------ */
650 
651 /* color handle */
663 
664 /* convert old 2.7 files to 2.8 */
666 
667 /* armatures */
669 
670 /* ****************************************************** */
671 /* Stroke Iteration Utilities */
672 
674  float diff_mat[4][4];
675  float inverse_diff_mat[4][4];
676 };
677 
688 #define GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) \
689  { \
690  struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \
691  Depsgraph *depsgraph_ = CTX_data_ensure_evaluated_depsgraph(C); \
692  Object *obact_ = CTX_data_active_object(C); \
693  bGPdata *gpd_ = CTX_data_gpencil_data(C); \
694  const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \
695  CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) { \
696  bGPDframe *init_gpf_ = (is_multiedit_) ? gpl->frames.first : gpl->actframe; \
697  for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \
698  if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \
699  BKE_gpencil_layer_transform_matrix_get( \
700  depsgraph_, obact_, gpl, gpstroke_iter.diff_mat); \
701  invert_m4_m4(gpstroke_iter.inverse_diff_mat, gpstroke_iter.diff_mat); \
702  /* loop over strokes */ \
703  bGPDstroke *gpsn_; \
704  for (bGPDstroke *gps = gpf_->strokes.first; gps; gps = gpsn_) { \
705  gpsn_ = gps->next; \
706  /* skip strokes that are invalid for current view */ \
707  if (ED_gpencil_stroke_can_use(C, gps) == false) { \
708  continue; \
709  } \
710  /* check if the color is editable */ \
711  if (ED_gpencil_stroke_material_editable(obact_, gpl, gps) == false) { \
712  continue; \
713  } \
714  /* ... Do Stuff With Strokes ... */
715 
716 #define GP_EDITABLE_STROKES_END(gpstroke_iter) \
717  } \
718  } \
719  if (!is_multiedit_) { \
720  break; \
721  } \
722  } \
723  } \
724  CTX_DATA_END; \
725  } \
726  (void)0
727 
740 #define GP_EDITABLE_CURVES_BEGIN(gpstroke_iter, C, gpl, gps, gpc) \
741  { \
742  struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \
743  Depsgraph *depsgraph_ = CTX_data_ensure_evaluated_depsgraph(C); \
744  Object *obact_ = CTX_data_active_object(C); \
745  bGPdata *gpd_ = CTX_data_gpencil_data(C); \
746  const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \
747  CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) { \
748  bGPDframe *init_gpf_ = (is_multiedit_) ? gpl->frames.first : gpl->actframe; \
749  for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \
750  if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \
751  BKE_gpencil_layer_transform_matrix_get( \
752  depsgraph_, obact_, gpl, gpstroke_iter.diff_mat); \
753  invert_m4_m4(gpstroke_iter.inverse_diff_mat, gpstroke_iter.diff_mat); \
754  /* loop over strokes */ \
755  bGPDstroke *gpsn_; \
756  for (bGPDstroke *gps = gpf_->strokes.first; gps; gps = gpsn_) { \
757  gpsn_ = gps->next; \
758  /* skip strokes that are invalid for current view */ \
759  if (ED_gpencil_stroke_can_use(C, gps) == false) \
760  continue; \
761  if (gps->editcurve == NULL) \
762  continue; \
763  bGPDcurve *gpc = gps->editcurve; \
764  /* ... Do Stuff With Strokes ... */
765 
766 #define GP_EDITABLE_CURVES_END(gpstroke_iter) \
767  } \
768  } \
769  if (!is_multiedit_) { \
770  break; \
771  } \
772  } \
773  } \
774  CTX_DATA_END; \
775  } \
776  (void)0
777 
788 #define GP_EVALUATED_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) \
789  { \
790  struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \
791  Depsgraph *depsgraph_ = CTX_data_ensure_evaluated_depsgraph(C); \
792  Object *obact_ = CTX_data_active_object(C); \
793  Object *ob_eval_ = (Object *)DEG_get_evaluated_id(depsgraph_, &obact_->id); \
794  bGPdata *gpd_ = (bGPdata *)ob_eval_->data; \
795  const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \
796  LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd_->layers) { \
797  if (BKE_gpencil_layer_is_editable(gpl)) { \
798  bGPDframe *init_gpf_ = (is_multiedit_) ? gpl->frames.first : gpl->actframe; \
799  for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \
800  if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \
801  BKE_gpencil_layer_transform_matrix_get( \
802  depsgraph_, obact_, gpl, gpstroke_iter.diff_mat); \
803  /* Undo layer transform. */ \
804  mul_m4_m4m4(gpstroke_iter.diff_mat, gpstroke_iter.diff_mat, gpl->layer_invmat); \
805  /* loop over strokes */ \
806  LISTBASE_FOREACH (bGPDstroke *, gps, &gpf_->strokes) { \
807  /* skip strokes that are invalid for current view */ \
808  if (ED_gpencil_stroke_can_use(C, gps) == false) { \
809  continue; \
810  } \
811  /* check if the color is editable */ \
812  if (ED_gpencil_stroke_material_editable(obact_, gpl, gps) == false) { \
813  continue; \
814  } \
815  /* ... Do Stuff With Strokes ... */
816 
817 #define GP_EVALUATED_STROKES_END(gpstroke_iter) \
818  } \
819  } \
820  if (!is_multiedit_) { \
821  break; \
822  } \
823  } \
824  } \
825  } \
826  } \
827  (void)0
828 
829 /* Reused items for bake operators. */
831 
832 /* ****************************************************** */
833 
834 #ifdef __cplusplus
835 }
836 #endif
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
#define C
Definition: RandGen.cpp:25
Scene scene
const Depsgraph * depsgraph
void GPENCIL_OT_select_vertex_color(struct wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_move(struct wmOperatorType *ot)
Definition: gpencil_data.c:425
void GPENCIL_OT_annotate(struct wmOperatorType *ot)
void gpencil_undo_init(struct bGPdata *gpd)
Definition: gpencil_undo.c:97
void GPENCIL_OT_material_isolate(struct wmOperatorType *ot)
void GPENCIL_OT_brush_reset(struct wmOperatorType *ot)
void GPENCIL_OT_interpolate(struct wmOperatorType *ot)
void GPENCIL_OT_select_lasso(struct wmOperatorType *ot)
void GPENCIL_OT_bake_grease_pencil_animation(struct wmOperatorType *ot)
void GPENCIL_OT_weightmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:649
struct tGPDprimitive tGPDprimitive
void GPENCIL_OT_weight_paint(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_group_smooth(struct wmOperatorType *ot)
void GPENCIL_OT_select_more(struct wmOperatorType *ot)
void GPENCIL_OT_unlock_all(struct wmOperatorType *ot)
void GPENCIL_OT_lock_layer(struct wmOperatorType *ot)
void GPENCIL_OT_frame_clean_loose(struct wmOperatorType *ot)
Definition: gpencil_data.c:844
void GPENCIL_OT_stroke_enter_editcurve_mode(struct wmOperatorType *ot)
@ GP_MERGE_POINT
@ GP_MERGE_STROKE
void GPENCIL_OT_select_random(struct wmOperatorType *ot)
struct GP_SpaceConversion GP_SpaceConversion
void gpencil_point_conversion_init(struct bContext *C, GP_SpaceConversion *r_gsc)
void GPENCIL_OT_layer_mask_move(struct wmOperatorType *ot)
const struct EnumPropertyItem * ED_gpencil_material_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
void GPENCIL_OT_stroke_join(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_group_invert(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_apply_thickness(struct wmOperatorType *ot)
void GPENCIL_OT_move_to_layer(struct wmOperatorType *ot)
void GPENCIL_OT_layer_active(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_sample(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_merge(struct wmOperatorType *ot)
void GPENCIL_OT_snap_to_grid(struct wmOperatorType *ot)
void GPENCIL_OT_sculpt_paint(struct wmOperatorType *ot)
const EnumPropertyItem rna_gpencil_reproject_type_items[]
void GPENCIL_OT_stroke_cutter(struct wmOperatorType *ot)
void GPENCIL_OT_selectmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:313
void GPENCIL_OT_material_to_vertex_color(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_arrange(struct wmOperatorType *ot)
void GPENCIL_OT_frame_clean_duplicate(struct wmOperatorType *ot)
Definition: gpencil_data.c:994
void GPENCIL_OT_stroke_smooth(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_reset_vertex_color(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_group_normalize(struct wmOperatorType *ot)
void GPENCIL_OT_layer_add(struct wmOperatorType *ot)
Definition: gpencil_data.c:245
void ED_gpencil_draw_fill(struct tGPDdraw *tgpw)
Definition: drawgpencil.c:410
eGPencil_PaintModes
@ GP_PAINTMODE_DRAW_POLY
@ GP_PAINTMODE_ERASER
@ GP_PAINTMODE_DRAW
@ GP_PAINTMODE_DRAW_STRAIGHT
@ GP_PAINTMODE_SET_CP
void GPENCIL_OT_annotation_active_frame_delete(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_normalize(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_group_deselect(struct wmOperatorType *ot)
void GPENCIL_OT_reset_transform_fill(struct wmOperatorType *ot)
Definition: gpencil_uv.c:516
void GPENCIL_OT_primitive_curve(struct wmOperatorType *ot)
void gpencil_point_3d_to_xy(const GP_SpaceConversion *gsc, short flag, const float pt[3], float xy[2])
void GPENCIL_OT_blank_frame_add(struct wmOperatorType *ot)
void GPENCIL_OT_snap_to_cursor(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_editcurve_set_handle_type(struct wmOperatorType *ot)
void GPENCIL_OT_transform_fill(struct wmOperatorType *ot)
Definition: gpencil_uv.c:427
void GPENCIL_OT_editmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:231
void GPENCIL_OT_stroke_cyclical_set(struct wmOperatorType *ot)
void GPENCIL_OT_select_first(struct wmOperatorType *ot)
void GPENCIL_OT_layer_remove(struct wmOperatorType *ot)
Definition: gpencil_data.c:333
void gpencil_point_to_parent_space(const bGPDspoint *pt, const float diff_mat[4][4], bGPDspoint *r_pt)
void GPENCIL_OT_primitive_circle(struct wmOperatorType *ot)
bool gpencil_brush_create_presets_poll(bContext *C)
void GPENCIL_OT_image_to_grease_pencil(struct wmOperatorType *ot)
void GPENCIL_OT_primitive_box(struct wmOperatorType *ot)
void GPENCIL_OT_material_unlock_all(struct wmOperatorType *ot)
void GPENCIL_OT_reproject(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_merge_by_distance(struct wmOperatorType *ot)
void GPENCIL_OT_layer_mask_remove(struct wmOperatorType *ot)
void GPENCIL_OT_active_frame_delete(struct wmOperatorType *ot)
void GPENCIL_OT_frame_clean_fill(struct wmOperatorType *ot)
Definition: gpencil_data.c:762
void GPENCIL_OT_annotation_add(struct wmOperatorType *ot)
Definition: gpencil_data.c:124
void gpencil_apply_parent_point(struct Depsgraph *depsgraph, struct Object *obact, bGPDlayer *gpl, bGPDspoint *pt)
void GPENCIL_OT_stroke_simplify(struct wmOperatorType *ot)
void GPENCIL_OT_material_hide(struct wmOperatorType *ot)
void GPENCIL_OT_snap_cursor_to_selected(struct wmOperatorType *ot)
int gpencil_delete_selected_point_wrap(bContext *C)
void GPENCIL_OT_select(struct wmOperatorType *ot)
struct GHash * gpencil_copybuf_validate_colormap(struct bContext *C)
void GPENCIL_OT_vertex_color_hsv(struct wmOperatorType *ot)
void GPENCIL_OT_select_linked(struct wmOperatorType *ot)
void GPENCIL_OT_select_grouped(struct wmOperatorType *ot)
void GPENCIL_OT_copy(struct wmOperatorType *ot)
void GPENCIL_OT_layer_duplicate(struct wmOperatorType *ot)
Definition: gpencil_data.c:492
bool gpencil_active_brush_poll(struct bContext *C)
void GPENCIL_OT_brush_reset_all(struct wmOperatorType *ot)
void GPENCIL_OT_trace_image(struct wmOperatorType *ot)
void GPENCIL_OT_layer_move(struct wmOperatorType *ot)
Definition: gpencil_data.c:402
void gpencil_undo_push(struct bGPdata *gpd)
Definition: gpencil_undo.c:113
void GPENCIL_OT_stroke_split(struct wmOperatorType *ot)
void GPENCIL_OT_sculptmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:541
void GPENCIL_OT_draw(struct wmOperatorType *ot)
void GPENCIL_OT_guide_rotate(struct wmOperatorType *ot)
void GPENCIL_OT_set_active_material(struct wmOperatorType *ot)
@ GP_STROKE_POLYLINE
@ GP_STROKE_CURVE
@ GP_STROKE_ARC
@ GP_STROKE_CIRCLE
@ GP_STROKE_LINE
@ GP_STROKE_BOX
void GPENCIL_OT_layer_duplicate_object(struct wmOperatorType *ot)
Definition: gpencil_data.c:609
void GPENCIL_OT_vertexmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:760
void GPENCIL_OT_vertex_group_assign(struct wmOperatorType *ot)
const struct EnumPropertyItem * ED_gpencil_layers_with_new_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
void GPENCIL_OT_primitive_polyline(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_group_select(struct wmOperatorType *ot)
void GPENCIL_OT_delete(struct wmOperatorType *ot)
void GPENCIL_OT_data_unlink(struct wmOperatorType *ot)
Definition: gpencil_data.c:176
bool gpencil_point_xy_to_3d(const GP_SpaceConversion *gsc, struct Scene *scene, const float screen_co[2], float r_out[3])
void GPENCIL_OT_extrude(struct wmOperatorType *ot)
const struct EnumPropertyItem * ED_gpencil_layers_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
void GPENCIL_OT_select_box(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_color_levels(struct wmOperatorType *ot)
void GPENCIL_OT_layer_merge(struct wmOperatorType *ot)
bool gpencil_active_layer_poll(struct bContext *C)
void GPENCIL_OT_interpolate_sequence(struct wmOperatorType *ot)
void GPENCIL_OT_duplicate(struct wmOperatorType *ot)
void GPENCIL_OT_layer_change(struct wmOperatorType *ot)
void GPENCIL_OT_bake_mesh_animation(struct wmOperatorType *ot)
void GPENCIL_OT_layer_mask_add(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_change_color(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_color_set(struct wmOperatorType *ot)
void GPENCIL_OT_generate_weights(struct wmOperatorType *ot)
void gpencil_undo_finish(void)
Definition: gpencil_undo.c:164
ListBase gpencil_strokes_copypastebuf
void GPENCIL_OT_convert(struct wmOperatorType *ot)
void GPENCIL_OT_interpolate_reverse(struct wmOperatorType *ot)
void GPENCIL_OT_lock_all(struct wmOperatorType *ot)
void GPENCIL_OT_extract_palette_vertex(struct wmOperatorType *ot)
void GPENCIL_OT_layer_isolate(struct wmOperatorType *ot)
void GPENCIL_OT_material_lock_unused(struct wmOperatorType *ot)
void gpencil_point_to_xy_fl(const GP_SpaceConversion *gsc, const bGPDstroke *gps, const bGPDspoint *pt, float *r_x, float *r_y)
void GPENCIL_OT_layer_annotation_add(struct wmOperatorType *ot)
Definition: gpencil_data.c:264
void GPENCIL_OT_vertex_color_brightness_contrast(struct wmOperatorType *ot)
void gpencil_stroke_convertcoords_tpoint(struct Scene *scene, struct ARegion *region, struct Object *ob, const struct tGPspoint *point2D, float *depth, float r_out[3])
void GPENCIL_OT_convert_old_files(struct wmOperatorType *ot)
void GPENCIL_OT_material_set(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_merge_material(struct wmOperatorType *ot)
void GPENCIL_OT_select_circle(struct wmOperatorType *ot)
void gpencil_apply_parent(struct Depsgraph *depsgraph, struct Object *obact, bGPDlayer *gpl, bGPDstroke *gps)
void GPENCIL_OT_paintmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:428
void GPENCIL_OT_material_lock_all(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_simplify_fixed(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_paint(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_caps_set(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_group_normalize_all(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_separate(struct wmOperatorType *ot)
void GPENCIL_OT_selection_opacity_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:810
void GPENCIL_OT_vertex_group_remove_from(struct wmOperatorType *ot)
void GPENCIL_OT_select_alternate(struct wmOperatorType *ot)
void GPENCIL_OT_recalc_geometry(struct wmOperatorType *ot)
struct GpRandomSettings GpRandomSettings
void GPENCIL_OT_hide(struct wmOperatorType *ot)
@ GP_STROKE_JOIN
@ GP_STROKE_JOINCOPY
bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1)
void GPENCIL_OT_frame_duplicate(struct wmOperatorType *ot)
Definition: gpencil_data.c:677
void GPENCIL_OT_active_frames_delete_all(struct wmOperatorType *ot)
void GPENCIL_OT_select_last(struct wmOperatorType *ot)
void GPENCIL_OT_dissolve(struct wmOperatorType *ot)
void GPENCIL_OT_material_reveal(struct wmOperatorType *ot)
void gpencil_subdivide_stroke(bGPdata *gpd, bGPDstroke *gps, int subdivide)
void GPENCIL_OT_fill(struct wmOperatorType *ot)
void GPENCIL_OT_materials_copy_to_object(struct wmOperatorType *ot)
bool gpencil_add_poll(struct bContext *C)
void GPENCIL_OT_reveal(struct wmOperatorType *ot)
void GPENCIL_OT_paste(struct wmOperatorType *ot)
void gpencil_point_to_xy(const GP_SpaceConversion *gsc, const struct bGPDstroke *gps, const struct bGPDspoint *pt, int *r_x, int *r_y)
void GPENCIL_OT_select_less(struct wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_remove(struct wmOperatorType *ot)
Definition: gpencil_data.c:355
void GPENCIL_OT_select_all(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_trim(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_subdivide(struct wmOperatorType *ot)
void GPENCIL_OT_primitive_line(struct wmOperatorType *ot)
void GPENCIL_OT_material_select(struct wmOperatorType *ot)
struct tGPDdraw tGPDdraw
void GPENCIL_OT_vertex_color_invert(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_flip(struct wmOperatorType *ot)
struct bGPDlayer * gpl
struct ARegion * region
struct bGPdata * gpd
struct View2D * v2d
struct Object * ob
struct Scene * scene
struct ScrArea * area
Definition: BKE_main.h:121
Definition: rand.cc:33
short lthick
float diff_mat[4][4]
int disable_fill
struct bGPdata * gpd
bool custonion
struct bGPDstroke * gps
float opacity
struct Object * ob
bool is_fill_stroke
struct Depsgraph * depsgraph
float tintcolor[4]
struct bGPDlayer * gpl
struct bGPDframe * gpf
struct bGPDframe * t_gpf
struct RegionView3D * rv3d
struct Object * ob
tGPspoint * points
struct ScrArea * area
struct ViewDepths * depths
struct bGPdata * gpd
struct Scene * scene
struct Object * ob_eval
struct Depsgraph * depsgraph
struct RNG * rng
struct Brush * brush
struct wmWindow * win
GP_SpaceConversion gsc
struct bGPDlayer * gpl
GpRandomSettings random_settings
struct bGPDframe * gpf
struct Main * bmain
struct ARegion * region
struct Material * material
float midpoint[2]
struct View3D * v3d
struct RegionView3D * rv3d
int xy[2]
Definition: wm_draw.c:135
PointerRNA * ptr
Definition: wm_files.c:3480
wmOperatorType * ot
Definition: wm_files.c:3479