Blender  V2.93
gpencil_intern.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2009 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "DNA_vec_types.h"
27 
28 #include "ED_numinput.h"
29 
30 /* internal exports only */
31 struct Material;
32 struct bGPDspoint;
33 struct bGPDstroke;
34 struct bGPdata;
35 struct tGPspoint;
36 
37 struct GHash;
38 struct RNG;
39 
40 struct ARegion;
41 struct Brush;
42 struct Scene;
43 struct View2D;
44 struct View3D;
45 struct wmOperatorType;
46 
47 struct Depsgraph;
48 
49 struct EnumPropertyItem;
50 struct PointerRNA;
51 struct PropertyRNA;
52 
53 /* ***************************************************** */
54 /* Modal Operator Geometry Preview
55  *
56  * Several modal operators (Fill, Interpolate, Primitive)
57  * need to run some drawing code to display previews, or
58  * to perform screen-space/image-based analysis routines.
59  * The following structs + function prototypes are used
60  * by these operators so that the operator code
61  * (in gpencil_<opname>.c) can communicate with the drawing
62  * code (in drawgpencil.c).
63  *
64  * NOTE: All this is within the gpencil module, so nothing needs
65  * to be exported to other modules.
66  */
67 
68 /* Internal Operator-State Data ------------------------ */
69 
71 typedef struct GpRandomSettings {
73  float pen_press;
74 
75  float hsv[3];
76  float pressure;
77  float strength;
78  float uv;
80 
81 /* Temporary draw data (no draw manager mode) */
82 typedef struct tGPDdraw {
83  struct RegionView3D *rv3d; /* region to draw */
84  struct Depsgraph *depsgraph; /* depsgraph */
85  struct Object *ob; /* GP object */
86  struct bGPdata *gpd; /* current GP datablock */
87  struct bGPDlayer *gpl; /* layer */
88  struct bGPDframe *gpf; /* frame */
89  struct bGPDframe *t_gpf; /* temporal frame */
90  struct bGPDstroke *gps; /* stroke */
91  int disable_fill; /* disable fill */
92  int offsx; /* windows offset x */
93  int offsy; /* windows offset y */
94  int winx; /* windows width */
95  int winy; /* windows height */
96  int dflag; /* flags datablock */
97  short lthick; /* layer thickness */
98  float opacity; /* opacity */
99  float tintcolor[4]; /* tint color */
100  bool onion; /* onion flag */
101  bool custonion; /* use custom onion colors */
102  bool is_fill_stroke; /* use fill tool */
103  float diff_mat[4][4]; /* matrix */
105 
106 /* Modal Operator Drawing Callbacks ------------------------ */
107 void ED_gpencil_draw_fill(struct tGPDdraw *tgpw);
108 
109 /* ***************************************************** */
110 /* Internal API */
111 
112 /* Stroke Coordinates API ------------------------------ */
113 /* gpencil_utils.c */
114 
115 typedef struct GP_SpaceConversion {
116  struct Scene *scene;
117  struct Object *ob;
118  struct bGPdata *gpd;
119  struct bGPDlayer *gpl;
120 
121  struct ScrArea *area;
122  struct ARegion *region;
123  struct View2D *v2d;
124 
125  rctf *subrect; /* for using the camera rect within the 3d view */
127 
128  float mat[4][4]; /* transform matrix on the strokes (introduced in [b770964]) */
130 
131 /* Temporary primitive operation data */
132 typedef struct tGPDprimitive {
134  struct Main *bmain;
137  struct wmWindow *win;
139  struct Scene *scene;
141  struct Object *ob;
143  struct Object *ob_eval;
145  struct ScrArea *area;
149  struct View3D *v3d;
151  struct ARegion *region;
153  struct bGPdata *gpd;
157  struct Brush *brush;
158 
161 
163  int cframe;
165  struct bGPDlayer *gpl;
167  struct bGPDframe *gpf;
169  int type;
173  bool curve;
179  short flip;
185  int subdiv;
191  float move[2];
193  float origin[2];
195  float start[2];
197  float end[2];
199  float midpoint[2];
201  float cp1[2];
203  float cp2[2];
205  int sel_cp;
207  int flag;
211  float mval[2];
213  float mvalo[2];
214 
217  struct RNG *rng;
218 
221 
223  float totpixlen;
224 
227 
229 
230 bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1);
231 
233 
235  const struct bGPDstroke *gps,
236  const struct bGPDspoint *pt,
237  int *r_x,
238  int *r_y);
239 
241  const bGPDstroke *gps,
242  const bGPDspoint *pt,
243  float *r_x,
244  float *r_y);
245 
247  const float diff_mat[4][4],
248  bGPDspoint *r_pt);
253  struct Object *obact,
254  bGPDlayer *gpl,
255  bGPDstroke *gps);
260  struct Object *obact,
261  bGPDlayer *gpl,
262  bGPDspoint *pt);
263 
265  const short flag,
266  const float pt[3],
267  float xy[2]);
268 
270  struct Scene *scene,
271  const float screen_co[2],
272  float r_out[3]);
273 
274 /* helper to convert 2d to 3d */
276  struct ARegion *region,
277  struct Object *ob,
278  const struct tGPspoint *point2D,
279  float *depth,
280  float out[3]);
281 
282 /* Poll Callbacks ------------------------------------ */
283 /* gpencil_utils.c */
284 
285 bool gpencil_add_poll(struct bContext *C);
286 bool gpencil_active_layer_poll(struct bContext *C);
287 bool gpencil_active_brush_poll(struct bContext *C);
289 
290 /* Copy/Paste Buffer --------------------------------- */
291 /* gpencil_edit.c */
292 
294 
295 /* Build a map for converting between old color-names and destination-color-refs. */
297 
298 /* Stroke Editing ------------------------------------ */
299 
301 
302 void gpencil_subdivide_stroke(bGPdata *gpd, bGPDstroke *gps, const int subdivide);
303 
304 /* Layers Enums -------------------------------------- */
305 
307  struct PointerRNA *ptr,
308  struct PropertyRNA *prop,
309  bool *r_free);
311  struct PointerRNA *ptr,
312  struct PropertyRNA *prop,
313  bool *r_free);
315  struct PointerRNA *ptr,
316  struct PropertyRNA *prop,
317  bool *r_free);
318 
319 /* ***************************************************** */
320 /* Operator Defines */
321 
322 /* annotations ------ */
323 
325 
326 /* drawing ---------- */
327 
328 void GPENCIL_OT_draw(struct wmOperatorType *ot);
329 void GPENCIL_OT_fill(struct wmOperatorType *ot);
330 
331 /* Vertex Paint. */
338 
339 /* Guides ----------------------- */
340 
342 
343 /* Paint Modes for operator */
344 typedef enum eGPencil_PaintModes {
351 
352 /* chunk size for gp-session buffer (the total size is a multiple of this number) */
353 #define GP_STROKE_BUFFER_CHUNK 2048
354 
355 /* stroke editing ----- */
356 
364 
365 void GPENCIL_OT_select(struct wmOperatorType *ot);
370 
379 
381 void GPENCIL_OT_delete(struct wmOperatorType *ot);
383 void GPENCIL_OT_copy(struct wmOperatorType *ot);
384 void GPENCIL_OT_paste(struct wmOperatorType *ot);
385 void GPENCIL_OT_extrude(struct wmOperatorType *ot);
386 
390 
394 
397 
398 /* stroke editcurve */
399 
402 
403 /* stroke sculpting -- */
404 
407 
408 /* buttons editing --- */
409 
412 
421 
424 
425 void GPENCIL_OT_hide(struct wmOperatorType *ot);
426 void GPENCIL_OT_reveal(struct wmOperatorType *ot);
427 
430 
433 
435 
443 
444 void GPENCIL_OT_convert(struct wmOperatorType *ot);
446 
449 
450 enum {
453 };
454 
455 enum {
462 };
463 
464 enum {
467 };
468 
489 
492 
495 
498 
499 /* undo stack ---------- */
500 
501 void gpencil_undo_init(struct bGPdata *gpd);
502 void gpencil_undo_push(struct bGPdata *gpd);
503 void gpencil_undo_finish(void);
504 
505 /* interpolation ---------- */
506 
510 
511 /* primitives ---------- */
512 
518 
519 /* vertex groups ------------ */
528 
529 /* color handle */
540 
541 /* convert old 2.7 files to 2.8 */
543 
544 /* armatures */
546 
547 /* ****************************************************** */
548 /* FILTERED ACTION DATA - TYPES ---> XXX DEPRECATED OLD ANIM SYSTEM CODE! */
549 
550 /* XXX - TODO: replace this with the modern bAnimListElem... */
551 /* This struct defines a structure used for quick access */
552 typedef struct bActListElem {
553  struct bActListElem *next, *prev;
554 
555  void *data; /* source data this elem represents */
556  int type; /* one of the ACTTYPE_* values */
557  int flag; /* copy of elem's flags for quick access */
558  int index; /* copy of adrcode where applicable */
559 
560  void *key_data; /* motion data - ipo or ipo-curve */
561  short datatype; /* type of motion data to expect */
562 
563  struct bActionGroup *grp; /* action group that owns the channel */
564 
565  void *owner; /* will either be an action channel or fake IPO-channel (for keys) */
566  short ownertype; /* type of owner */
568 
569 /* ****************************************************** */
570 /* FILTER ACTION DATA - METHODS/TYPES */
571 
572 /* filtering flags - under what circumstances should a channel be added */
573 typedef enum ACTFILTER_FLAGS {
574  ACTFILTER_VISIBLE = (1 << 0), /* should channels be visible */
575  ACTFILTER_SEL = (1 << 1), /* should channels be selected */
576  ACTFILTER_FOREDIT = (1 << 2), /* does editable status matter */
577  ACTFILTER_CHANNELS = (1 << 3), /* do we only care that it is a channel */
578  ACTFILTER_IPOKEYS = (1 << 4), /* only channels referencing IPO's */
579  ACTFILTER_ONLYICU = (1 << 5), /* only reference ipo-curves */
580  ACTFILTER_FORDRAWING = (1 << 6), /* make list for interface drawing */
581  ACTFILTER_ACTGROUPED = (1 << 7), /* belongs to the active group */
583 
584 /* Action Editor - Main Data types */
585 typedef enum ACTCONT_TYPES {
591 
592 /* ****************************************************** */
593 /* Stroke Iteration Utilities */
594 
596  float diff_mat[4][4];
597  float inverse_diff_mat[4][4];
598 };
599 
610 #define GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) \
611  { \
612  struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \
613  Depsgraph *depsgraph_ = CTX_data_ensure_evaluated_depsgraph(C); \
614  Object *obact_ = CTX_data_active_object(C); \
615  bGPdata *gpd_ = CTX_data_gpencil_data(C); \
616  const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \
617  CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) { \
618  bGPDframe *init_gpf_ = (is_multiedit_) ? gpl->frames.first : gpl->actframe; \
619  for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \
620  if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \
621  BKE_gpencil_layer_transform_matrix_get( \
622  depsgraph_, obact_, gpl, gpstroke_iter.diff_mat); \
623  invert_m4_m4(gpstroke_iter.inverse_diff_mat, gpstroke_iter.diff_mat); \
624  /* loop over strokes */ \
625  bGPDstroke *gpsn_; \
626  for (bGPDstroke *gps = gpf_->strokes.first; gps; gps = gpsn_) { \
627  gpsn_ = gps->next; \
628  /* skip strokes that are invalid for current view */ \
629  if (ED_gpencil_stroke_can_use(C, gps) == false) { \
630  continue; \
631  } \
632  /* check if the color is editable */ \
633  if (ED_gpencil_stroke_material_editable(obact_, gpl, gps) == false) { \
634  continue; \
635  } \
636  /* ... Do Stuff With Strokes ... */
637 
638 #define GP_EDITABLE_STROKES_END(gpstroke_iter) \
639  } \
640  } \
641  if (!is_multiedit_) { \
642  break; \
643  } \
644  } \
645  } \
646  CTX_DATA_END; \
647  } \
648  (void)0
649 
662 #define GP_EDITABLE_CURVES_BEGIN(gpstroke_iter, C, gpl, gps, gpc) \
663  { \
664  struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \
665  Depsgraph *depsgraph_ = CTX_data_ensure_evaluated_depsgraph(C); \
666  Object *obact_ = CTX_data_active_object(C); \
667  bGPdata *gpd_ = CTX_data_gpencil_data(C); \
668  const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \
669  CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) { \
670  bGPDframe *init_gpf_ = (is_multiedit_) ? gpl->frames.first : gpl->actframe; \
671  for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \
672  if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \
673  BKE_gpencil_layer_transform_matrix_get( \
674  depsgraph_, obact_, gpl, gpstroke_iter.diff_mat); \
675  invert_m4_m4(gpstroke_iter.inverse_diff_mat, gpstroke_iter.diff_mat); \
676  /* loop over strokes */ \
677  bGPDstroke *gpsn_; \
678  for (bGPDstroke *gps = gpf_->strokes.first; gps; gps = gpsn_) { \
679  gpsn_ = gps->next; \
680  /* skip strokes that are invalid for current view */ \
681  if (ED_gpencil_stroke_can_use(C, gps) == false) \
682  continue; \
683  if (gps->editcurve == NULL) \
684  continue; \
685  bGPDcurve *gpc = gps->editcurve; \
686  /* ... Do Stuff With Strokes ... */
687 
688 #define GP_EDITABLE_CURVES_END(gpstroke_iter) \
689  } \
690  } \
691  if (!is_multiedit_) { \
692  break; \
693  } \
694  } \
695  } \
696  CTX_DATA_END; \
697  } \
698  (void)0
699 
710 #define GP_EVALUATED_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) \
711  { \
712  struct GP_EditableStrokes_Iter gpstroke_iter = {{{0}}}; \
713  Depsgraph *depsgraph_ = CTX_data_ensure_evaluated_depsgraph(C); \
714  Object *obact_ = CTX_data_active_object(C); \
715  Object *ob_eval_ = (Object *)DEG_get_evaluated_id(depsgraph_, &obact_->id); \
716  bGPdata *gpd_ = (bGPdata *)ob_eval_->data; \
717  const bool is_multiedit_ = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \
718  LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd_->layers) { \
719  if (BKE_gpencil_layer_is_editable(gpl)) { \
720  bGPDframe *init_gpf_ = (is_multiedit_) ? gpl->frames.first : gpl->actframe; \
721  for (bGPDframe *gpf_ = init_gpf_; gpf_; gpf_ = gpf_->next) { \
722  if ((gpf_ == gpl->actframe) || ((gpf_->flag & GP_FRAME_SELECT) && is_multiedit_)) { \
723  BKE_gpencil_layer_transform_matrix_get( \
724  depsgraph_, obact_, gpl, gpstroke_iter.diff_mat); \
725  /* Undo layer transform. */ \
726  mul_m4_m4m4(gpstroke_iter.diff_mat, gpstroke_iter.diff_mat, gpl->layer_invmat); \
727  /* loop over strokes */ \
728  LISTBASE_FOREACH (bGPDstroke *, gps, &gpf_->strokes) { \
729  /* skip strokes that are invalid for current view */ \
730  if (ED_gpencil_stroke_can_use(C, gps) == false) { \
731  continue; \
732  } \
733  /* check if the color is editable */ \
734  if (ED_gpencil_stroke_material_editable(obact_, gpl, gps) == false) { \
735  continue; \
736  } \
737  /* ... Do Stuff With Strokes ... */
738 
739 #define GP_EVALUATED_STROKES_END(gpstroke_iter) \
740  } \
741  } \
742  if (!is_multiedit_) { \
743  break; \
744  } \
745  } \
746  } \
747  } \
748  } \
749  (void)0
750 
751 /* ****************************************************** */
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
_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:39
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:429
void GPENCIL_OT_annotate(struct wmOperatorType *ot)
void gpencil_undo_init(struct bGPdata *gpd)
Definition: gpencil_undo.c:116
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_weightmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:663
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:859
@ GP_STROKE_JOIN
@ GP_STROKE_JOINCOPY
void GPENCIL_OT_stroke_enter_editcurve_mode(struct wmOperatorType *ot)
struct GP_SpaceConversion GP_SpaceConversion
void gpencil_point_conversion_init(struct bContext *C, GP_SpaceConversion *r_gsc)
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)
void GPENCIL_OT_stroke_cutter(struct wmOperatorType *ot)
void GPENCIL_OT_selectmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:327
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)
void GPENCIL_OT_stroke_smooth(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_reset_vertex_color(struct wmOperatorType *ot)
@ GP_MERGE_POINT
@ GP_MERGE_STROKE
void GPENCIL_OT_vertex_group_normalize(struct wmOperatorType *ot)
void GPENCIL_OT_layer_add(struct wmOperatorType *ot)
Definition: gpencil_data.c:260
void ED_gpencil_draw_fill(struct tGPDdraw *tgpw)
Definition: drawgpencil.c:416
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_vertex_group_deselect(struct wmOperatorType *ot)
void GPENCIL_OT_reset_transform_fill(struct wmOperatorType *ot)
Definition: gpencil_uv.c:530
void GPENCIL_OT_primitive_curve(struct wmOperatorType *ot)
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:441
void GPENCIL_OT_editmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:245
void gpencil_subdivide_stroke(bGPdata *gpd, bGPDstroke *gps, const int subdivide)
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:337
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)
struct bActListElem bActListElem
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:777
void GPENCIL_OT_annotation_add(struct wmOperatorType *ot)
Definition: gpencil_data.c:140
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:496
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:406
void gpencil_undo_push(struct bGPdata *gpd)
Definition: gpencil_undo.c:132
void GPENCIL_OT_stroke_split(struct wmOperatorType *ot)
void GPENCIL_OT_sculptmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:555
void GPENCIL_OT_draw(struct wmOperatorType *ot)
void gpencil_point_3d_to_xy(const GP_SpaceConversion *gsc, const short flag, const float pt[3], float xy[2])
void GPENCIL_OT_guide_rotate(struct wmOperatorType *ot)
void GPENCIL_OT_set_active_material(struct wmOperatorType *ot)
void GPENCIL_OT_layer_duplicate_object(struct wmOperatorType *ot)
Definition: gpencil_data.c:629
void GPENCIL_OT_vertexmode_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:772
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:192
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)
Definition: gpencil_mesh.c:403
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:185
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:279
void GPENCIL_OT_vertex_color_brightness_contrast(struct wmOperatorType *ot)
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:442
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)
@ GP_STROKE_POLYLINE
@ GP_STROKE_CURVE
@ GP_STROKE_ARC
@ GP_STROKE_CIRCLE
@ GP_STROKE_LINE
@ GP_STROKE_BOX
void GPENCIL_OT_stroke_separate(struct wmOperatorType *ot)
void GPENCIL_OT_selection_opacity_toggle(struct wmOperatorType *ot)
Definition: gpencil_edit.c:822
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)
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:692
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_OT_fill(struct wmOperatorType *ot)
ACTFILTER_FLAGS
@ ACTFILTER_CHANNELS
@ ACTFILTER_ACTGROUPED
@ ACTFILTER_VISIBLE
@ ACTFILTER_ONLYICU
@ ACTFILTER_FOREDIT
@ ACTFILTER_SEL
@ ACTFILTER_IPOKEYS
@ ACTFILTER_FORDRAWING
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:359
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_stroke_convertcoords_tpoint(struct Scene *scene, struct ARegion *region, struct Object *ob, const struct tGPspoint *point2D, float *depth, float out[3])
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)
ACTCONT_TYPES
@ ACTCONT_ACTION
@ ACTCONT_SHAPEKEY
@ ACTCONT_NONE
@ ACTCONT_GPENCIL
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:116
Definition: rand.cc:48
struct bActListElem * next
struct bActListElem * prev
struct bActionGroup * grp
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 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
PointerRNA * ptr
Definition: wm_files.c:3157
wmOperatorType * ot
Definition: wm_files.c:3156