Blender  V2.93
gpencil_ops.c
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  * This is a new part of Blender
18  */
19 
24 #include <stddef.h>
25 #include <stdio.h>
26 #include <stdlib.h>
27 
28 #include "BLI_sys_types.h"
29 
30 #include "BKE_context.h"
31 #include "BKE_paint.h"
32 
33 #include "DNA_brush_types.h"
34 #include "DNA_gpencil_types.h"
35 #include "DNA_object_types.h"
36 #include "DNA_screen_types.h"
37 #include "DNA_space_types.h"
38 
39 #include "WM_api.h"
40 #include "WM_toolsystem.h"
41 #include "WM_types.h"
42 
43 #include "RNA_access.h"
44 
45 #include "ED_gpencil.h"
46 
47 #include "gpencil_intern.h"
48 
49 /* ****************************************** */
50 /* Grease Pencil Keymaps */
51 
52 /* Generic Drawing Keymap - Annotations */
54 {
55  WM_keymap_ensure(keyconf, "Grease Pencil", 0, 0);
56 }
57 
58 /* ==================== */
59 
60 /* Poll callback for stroke editing mode */
62 {
64  return (gpd && (gpd->flag & GP_DATA_STROKE_EDITMODE));
65 }
66 
67 /* Poll callback for stroke curve editing mode */
69 {
72 }
73 
74 /* Poll callback for stroke painting mode */
76 {
77  /* TODO: limit this to mode, but review 2D editors */
79  return (gpd && (gpd->flag & GP_DATA_STROKE_PAINTMODE));
80 }
81 
82 static bool gpencil_stroke_paintmode_poll_with_tool(bContext *C, const char gpencil_tool)
83 {
84  /* TODO: limit this to mode, but review 2D editors */
86  if (!gpd) {
87  return false;
88  }
89 
91  if (!ts || !ts->gp_paint) {
92  return false;
93  }
94 
95  Brush *brush = BKE_paint_brush(&ts->gp_paint->paint);
96  return ((gpd->flag & GP_DATA_STROKE_PAINTMODE) && (brush && brush->gpencil_settings) &&
97  WM_toolsystem_active_tool_is_brush(C) && (brush->gpencil_tool == gpencil_tool));
98 }
99 
100 static bool gpencil_stroke_vertexmode_poll_with_tool(bContext *C, const char gpencil_vertex_tool)
101 {
103  if (!gpd) {
104  return false;
105  }
106 
108  if (!ts || !ts->gp_vertexpaint) {
109  return false;
110  }
111 
112  Brush *brush = BKE_paint_brush(&ts->gp_vertexpaint->paint);
113  return ((gpd->flag & GP_DATA_STROKE_VERTEXMODE) && (brush && brush->gpencil_settings) &&
115  (brush->gpencil_vertex_tool == gpencil_vertex_tool));
116 }
117 
118 static bool gpencil_stroke_sculptmode_poll_with_tool(bContext *C, const char gpencil_sculpt_tool)
119 {
121  if (!gpd) {
122  return false;
123  }
124 
126  if (!ts || !ts->gp_sculptpaint) {
127  return false;
128  }
129 
130  Brush *brush = BKE_paint_brush(&ts->gp_sculptpaint->paint);
131  return ((gpd->flag & GP_DATA_STROKE_SCULPTMODE) && (brush && brush->gpencil_settings) &&
133  (brush->gpencil_sculpt_tool == gpencil_sculpt_tool));
134 }
135 
136 static bool gpencil_stroke_weightmode_poll_with_tool(bContext *C, const char gpencil_weight_tool)
137 {
139  if (!gpd) {
140  return false;
141  }
142 
144  if (!ts || !ts->gp_weightpaint) {
145  return false;
146  }
147 
148  Brush *brush = BKE_paint_brush(&ts->gp_weightpaint->paint);
149  return ((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) && (brush && brush->gpencil_settings) &&
151  (brush->gpencil_weight_tool == gpencil_weight_tool));
152 }
153 
154 /* Poll callback for stroke painting (draw brush) */
156 {
158 }
159 
160 /* Poll callback for stroke painting (erase brush) */
162 {
164 }
165 
166 /* Poll callback for stroke painting (fill) */
168 {
170 }
171 
172 /* Poll callback for stroke painting (tint) */
174 {
176 }
177 
178 /* Poll callback for stroke sculpting mode */
180 {
184 
185  /* if not gpencil object and not view3d, need sculpt keys if edit mode */
186  if (area->spacetype != SPACE_VIEW3D) {
187  return ((gpd) && (gpd->flag & GP_DATA_STROKE_EDITMODE));
188  }
189 
190  if ((ob) && (ob->type == OB_GPENCIL)) {
191  return GPENCIL_SCULPT_MODE(gpd);
192  }
193 
194  return 0;
195 }
196 
197 /* Poll callback for stroke weight paint mode */
199 {
202 
203  if ((ob) && (ob->type == OB_GPENCIL)) {
204  return GPENCIL_WEIGHT_MODE(gpd);
205  }
206 
207  return 0;
208 }
209 
210 /* Poll callback for stroke vertex paint mode */
212 {
215 
216  if ((ob) && (ob->type == OB_GPENCIL)) {
217  return (gpd && (gpd->flag & GP_DATA_STROKE_VERTEXMODE));
218  }
219 
220  return 0;
221 }
222 
223 /* Poll callback for vertex painting (draw) */
225 {
227 }
228 
229 /* Poll callback for vertex painting (blur) */
231 {
233 }
234 
235 /* Poll callback for vertex painting (average) */
237 {
239 }
240 
241 /* Poll callback for vertex painting (smear) */
243 {
245 }
246 
247 /* Poll callback for vertex painting (replace) */
249 {
251 }
252 
253 /* Poll callback for sculpt (Smooth) */
255 {
257 }
258 /* Poll callback for sculpt (Thickness) */
260 {
262 }
263 
264 /* Poll callback for sculpt (Strength) */
266 {
268 }
269 
270 /* Poll callback for sculpt (Grab) */
272 {
274 }
275 
276 /* Poll callback for sculpt (Push) */
278 {
280 }
281 
282 /* Poll callback for sculpt (Twist) */
284 {
286 }
287 
288 /* Poll callback for sculpt (Pinch) */
290 {
292 }
293 /* Poll callback for sculpt (Randomize) */
295 {
297 }
298 
299 /* Poll callback for sculpt (Clone) */
301 {
303 }
304 
305 /* Poll callback for weight paint (Draw) */
307 {
309 }
310 
311 /* Stroke Editing Keymap - Only when editmode is enabled */
313 {
314  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Edit Mode", 0, 0);
315 
316  /* set poll callback - so that this keymap only gets enabled when stroke editmode is enabled */
318 }
319 
320 /* Stroke Curve Editing Keymap - Only when editmode is enabled and in curve edit mode */
322 {
323  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Curve Edit Mode", 0, 0);
324 
325  /* set poll callback - so that this keymap only gets enabled when curve editmode is enabled */
327 }
328 
329 /* keys for draw with a drawing brush (no fill) */
331 {
332  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Paint (Draw brush)", 0, 0);
334 }
335 
336 /* keys for draw with a eraser brush (erase) */
338 {
339  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Paint (Erase)", 0, 0);
341 }
342 
343 /* keys for draw with a fill brush */
345 {
346  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Paint (Fill)", 0, 0);
348 }
349 
350 /* keys for draw with a tint brush */
352 {
353  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Paint (Tint)", 0, 0);
355 }
356 
357 /* Stroke Painting Keymap - Only when paintmode is enabled */
359 {
360  /* set poll callback - so that this keymap only gets enabled when stroke paintmode is enabled */
361  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Paint Mode", 0, 0);
363 }
364 
365 /* Stroke Sculpting Keymap - Only when sculptmode is enabled */
367 {
368  /* set poll callback - so that this keymap only gets enabled when stroke sculptmode is enabled */
369  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt Mode", 0, 0);
371 }
372 
373 /* Stroke Weight Paint Keymap - Only when weight is enabled */
375 {
376  /* set poll callback - so that this keymap only gets enabled when stroke sculptmode is enabled */
377  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Weight Mode", 0, 0);
379 }
380 
382 {
383  /* set poll callback - so that this keymap only gets enabled when stroke vertex is enabled */
384  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Vertex Mode", 0, 0);
386 }
387 
388 /* keys for vertex with a draw brush */
390 {
391  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Vertex (Draw)", 0, 0);
393 }
394 
395 /* keys for vertex with a blur brush */
397 {
398  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Vertex (Blur)", 0, 0);
400 }
401 /* keys for vertex with a average brush */
403 {
404  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Vertex (Average)", 0, 0);
406 }
407 /* keys for vertex with a smear brush */
409 {
410  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Vertex (Smear)", 0, 0);
412 }
413 /* keys for vertex with a replace brush */
415 {
416  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Vertex (Replace)", 0, 0);
418 }
419 /* keys for sculpt with a smooth brush */
421 {
422  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Smooth)", 0, 0);
424 }
425 /* keys for sculpt with a thickness brush */
427 {
428  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Thickness)", 0, 0);
430 }
431 /* keys for sculpt with a strength brush */
433 {
434  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Strength)", 0, 0);
436 }
437 /* keys for sculpt with a grab brush */
439 {
440  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Grab)", 0, 0);
442 }
443 /* keys for sculpt with a push brush */
445 {
446  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Push)", 0, 0);
448 }
449 /* keys for sculpt with a twist brush */
451 {
452  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Twist)", 0, 0);
454 }
455 /* keys for sculpt with a pinch brush */
457 {
458  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Pinch)", 0, 0);
460 }
461 /* keys for sculpt with a randomize brush */
463 {
464  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Randomize)", 0, 0);
466 }
467 /* keys for sculpt with a clone brush */
469 {
470  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Sculpt (Clone)", 0, 0);
472 }
473 /* keys for weight with a draw brush */
475 {
476  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Grease Pencil Stroke Weight (Draw)", 0, 0);
478 }
479 
480 /* ==================== */
481 
483 {
484  ed_keymap_gpencil_general(keyconf);
486  ed_keymap_gpencil_editing(keyconf);
510 }
511 
512 /* ****************************************** */
513 
515 {
516  /* Annotations -------------------- */
517 
519 
520  /* Drawing ----------------------- */
521 
530 
531  /* Guides ----------------------- */
532 
534 
535  /* Editing (Strokes) ------------ */
536 
544 
550 
559 
566 
570 
572 
576 
579 
582 
583  /* Edit stroke editcurve */
584 
587 
588  /* Editing (Buttons) ------------ */
589 
592 
601 
604 
611 
613 
621 
624 
626 #ifdef WITH_POTRACE
628 #endif
650 
653 
656 
659 
660  /* vertex groups */
669 
670  /* color handle */
679 
680  /* Editing (Time) --------------- */
681 
682  /* Interpolation */
686 
687  /* Primitives */
693 
694  /* convert old 2.7 files to 2.8 */
696 
697  /* armatures */
699 }
700 
702 {
704  wmOperatorTypeMacro *otmacro;
705 
706  /* Duplicate + Move = Interactively place newly duplicated strokes */
708  "GPENCIL_OT_duplicate_move",
709  "Duplicate Strokes",
710  "Make copies of the selected Grease Pencil strokes and move them",
712  WM_operatortype_macro_define(ot, "GPENCIL_OT_duplicate");
713  otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
714  RNA_boolean_set(otmacro->ptr, "gpencil_strokes", true);
715  RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
716  RNA_boolean_set(otmacro->ptr, "mirror", false);
717 
718  /* Extrude + Move = Interactively add new points */
719  ot = WM_operatortype_append_macro("GPENCIL_OT_extrude_move",
720  "Extrude Stroke Points",
721  "Extrude selected points and move them",
723  WM_operatortype_macro_define(ot, "GPENCIL_OT_extrude");
724  otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
725  RNA_boolean_set(otmacro->ptr, "gpencil_strokes", true);
726  RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
727  RNA_boolean_set(otmacro->ptr, "mirror", false);
728 }
729 
730 /* ****************************************** */
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:714
struct bGPdata * CTX_data_gpencil_data(const bContext *C)
Definition: context.c:1371
struct Object * CTX_data_active_object(const bContext *C)
Definition: context.c:1279
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
Definition: context.c:1208
struct Brush * BKE_paint_brush(struct Paint *paint)
Definition: paint.c:604
@ GPAINT_TOOL_ERASE
@ GPAINT_TOOL_FILL
@ GPAINT_TOOL_DRAW
@ GPAINT_TOOL_TINT
@ GPWEIGHT_TOOL_DRAW
@ GPVERTEX_TOOL_AVERAGE
@ GPVERTEX_TOOL_REPLACE
@ GPVERTEX_TOOL_DRAW
@ GPVERTEX_TOOL_BLUR
@ GPVERTEX_TOOL_SMEAR
@ GPSCULPT_TOOL_GRAB
@ GPSCULPT_TOOL_TWIST
@ GPSCULPT_TOOL_PUSH
@ GPSCULPT_TOOL_STRENGTH
@ GPSCULPT_TOOL_PINCH
@ GPSCULPT_TOOL_SMOOTH
@ GPSCULPT_TOOL_CLONE
@ GPSCULPT_TOOL_THICKNESS
@ GPSCULPT_TOOL_RANDOMIZE
#define GPENCIL_EDIT_MODE(gpd)
#define GPENCIL_WEIGHT_MODE(gpd)
#define GPENCIL_SCULPT_MODE(gpd)
@ GP_DATA_STROKE_WEIGHTMODE
@ GP_DATA_STROKE_VERTEXMODE
@ GP_DATA_STROKE_PAINTMODE
@ GP_DATA_STROKE_SCULPTMODE
@ GP_DATA_STROKE_EDITMODE
#define GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)
Object is a sort of wrapper for general info.
@ OB_GPENCIL
@ SPACE_VIEW3D
#define C
Definition: RandGen.cpp:39
@ OPTYPE_UNDO
Definition: WM_types.h:155
@ OPTYPE_REGISTER
Definition: WM_types.h:153
void GPENCIL_OT_annotate(wmOperatorType *ot)
void GPENCIL_OT_generate_weights(wmOperatorType *ot)
void GPENCIL_OT_image_to_grease_pencil(wmOperatorType *ot)
void GPENCIL_OT_convert(wmOperatorType *ot)
void GPENCIL_OT_layer_change(wmOperatorType *ot)
void GPENCIL_OT_stroke_arrange(wmOperatorType *ot)
void GPENCIL_OT_vertex_group_smooth(wmOperatorType *ot)
void GPENCIL_OT_layer_remove(wmOperatorType *ot)
Definition: gpencil_data.c:337
void GPENCIL_OT_vertex_group_invert(wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_move(wmOperatorType *ot)
Definition: gpencil_data.c:429
void GPENCIL_OT_material_reveal(wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_remove(wmOperatorType *ot)
Definition: gpencil_data.c:359
void GPENCIL_OT_frame_duplicate(wmOperatorType *ot)
Definition: gpencil_data.c:692
void GPENCIL_OT_layer_isolate(wmOperatorType *ot)
void GPENCIL_OT_lock_all(wmOperatorType *ot)
void GPENCIL_OT_layer_mask_remove(wmOperatorType *ot)
void GPENCIL_OT_stroke_change_color(wmOperatorType *ot)
void GPENCIL_OT_material_set(wmOperatorType *ot)
void GPENCIL_OT_vertex_group_normalize_all(wmOperatorType *ot)
void GPENCIL_OT_material_lock_unused(wmOperatorType *ot)
void GPENCIL_OT_material_select(wmOperatorType *ot)
void GPENCIL_OT_frame_clean_fill(wmOperatorType *ot)
Definition: gpencil_data.c:777
void GPENCIL_OT_brush_reset_all(wmOperatorType *ot)
void GPENCIL_OT_annotation_add(wmOperatorType *ot)
Definition: gpencil_data.c:140
void GPENCIL_OT_vertex_group_normalize(wmOperatorType *ot)
void GPENCIL_OT_layer_add(wmOperatorType *ot)
Definition: gpencil_data.c:260
void GPENCIL_OT_layer_mask_add(wmOperatorType *ot)
void GPENCIL_OT_reveal(wmOperatorType *ot)
void GPENCIL_OT_layer_duplicate(wmOperatorType *ot)
Definition: gpencil_data.c:496
void GPENCIL_OT_vertex_group_assign(wmOperatorType *ot)
void GPENCIL_OT_layer_merge(wmOperatorType *ot)
void GPENCIL_OT_unlock_all(wmOperatorType *ot)
void GPENCIL_OT_material_lock_all(wmOperatorType *ot)
void GPENCIL_OT_data_unlink(wmOperatorType *ot)
Definition: gpencil_data.c:192
void GPENCIL_OT_brush_reset(wmOperatorType *ot)
void GPENCIL_OT_set_active_material(wmOperatorType *ot)
void GPENCIL_OT_frame_clean_loose(wmOperatorType *ot)
Definition: gpencil_data.c:859
void GPENCIL_OT_hide(wmOperatorType *ot)
void GPENCIL_OT_material_isolate(wmOperatorType *ot)
void GPENCIL_OT_vertex_group_select(wmOperatorType *ot)
void GPENCIL_OT_vertex_group_deselect(wmOperatorType *ot)
void GPENCIL_OT_material_hide(wmOperatorType *ot)
void GPENCIL_OT_layer_duplicate_object(wmOperatorType *ot)
Definition: gpencil_data.c:629
void GPENCIL_OT_layer_annotation_add(wmOperatorType *ot)
Definition: gpencil_data.c:279
void GPENCIL_OT_layer_move(wmOperatorType *ot)
Definition: gpencil_data.c:406
void GPENCIL_OT_material_unlock_all(wmOperatorType *ot)
void GPENCIL_OT_lock_layer(wmOperatorType *ot)
void GPENCIL_OT_vertex_group_remove_from(wmOperatorType *ot)
void GPENCIL_OT_frame_clean_duplicate(wmOperatorType *ot)
void GPENCIL_OT_layer_active(wmOperatorType *ot)
void GPENCIL_OT_recalc_geometry(wmOperatorType *ot)
void GPENCIL_OT_snap_to_cursor(wmOperatorType *ot)
void GPENCIL_OT_stroke_cyclical_set(wmOperatorType *ot)
void GPENCIL_OT_move_to_layer(wmOperatorType *ot)
void GPENCIL_OT_paintmode_toggle(wmOperatorType *ot)
Definition: gpencil_edit.c:442
void GPENCIL_OT_stroke_simplify_fixed(wmOperatorType *ot)
void GPENCIL_OT_copy(wmOperatorType *ot)
void GPENCIL_OT_snap_to_grid(wmOperatorType *ot)
void GPENCIL_OT_active_frame_delete(wmOperatorType *ot)
void GPENCIL_OT_stroke_flip(wmOperatorType *ot)
void GPENCIL_OT_dissolve(wmOperatorType *ot)
void GPENCIL_OT_stroke_simplify(wmOperatorType *ot)
void GPENCIL_OT_snap_cursor_to_selected(wmOperatorType *ot)
void GPENCIL_OT_weightmode_toggle(wmOperatorType *ot)
Definition: gpencil_edit.c:663
void GPENCIL_OT_stroke_split(wmOperatorType *ot)
void GPENCIL_OT_blank_frame_add(wmOperatorType *ot)
void GPENCIL_OT_annotation_active_frame_delete(wmOperatorType *ot)
void GPENCIL_OT_stroke_trim(wmOperatorType *ot)
void GPENCIL_OT_editmode_toggle(wmOperatorType *ot)
Definition: gpencil_edit.c:245
void GPENCIL_OT_active_frames_delete_all(wmOperatorType *ot)
void GPENCIL_OT_delete(wmOperatorType *ot)
void GPENCIL_OT_stroke_merge_by_distance(wmOperatorType *ot)
void GPENCIL_OT_vertexmode_toggle(wmOperatorType *ot)
Definition: gpencil_edit.c:772
void GPENCIL_OT_stroke_apply_thickness(wmOperatorType *ot)
void GPENCIL_OT_paste(wmOperatorType *ot)
void GPENCIL_OT_stroke_caps_set(wmOperatorType *ot)
void GPENCIL_OT_stroke_separate(wmOperatorType *ot)
void GPENCIL_OT_selection_opacity_toggle(wmOperatorType *ot)
Definition: gpencil_edit.c:822
void GPENCIL_OT_stroke_cutter(wmOperatorType *ot)
void GPENCIL_OT_duplicate(wmOperatorType *ot)
void GPENCIL_OT_stroke_sample(wmOperatorType *ot)
void GPENCIL_OT_stroke_smooth(wmOperatorType *ot)
void GPENCIL_OT_selectmode_toggle(wmOperatorType *ot)
Definition: gpencil_edit.c:327
void GPENCIL_OT_extrude(wmOperatorType *ot)
void GPENCIL_OT_reproject(wmOperatorType *ot)
void GPENCIL_OT_sculptmode_toggle(wmOperatorType *ot)
Definition: gpencil_edit.c:555
void GPENCIL_OT_stroke_join(wmOperatorType *ot)
void GPENCIL_OT_stroke_subdivide(wmOperatorType *ot)
void GPENCIL_OT_stroke_enter_editcurve_mode(wmOperatorType *ot)
void GPENCIL_OT_stroke_editcurve_set_handle_type(wmOperatorType *ot)
void GPENCIL_OT_fill(wmOperatorType *ot)
void GPENCIL_OT_select_vertex_color(struct wmOperatorType *ot)
void GPENCIL_OT_interpolate(struct wmOperatorType *ot)
void GPENCIL_OT_select_lasso(struct wmOperatorType *ot)
void GPENCIL_OT_weight_paint(struct wmOperatorType *ot)
void GPENCIL_OT_select_more(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_merge(struct wmOperatorType *ot)
void GPENCIL_OT_sculpt_paint(struct wmOperatorType *ot)
void GPENCIL_OT_material_to_vertex_color(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_reset_vertex_color(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_transform_fill(struct wmOperatorType *ot)
Definition: gpencil_uv.c:441
void GPENCIL_OT_select_first(struct wmOperatorType *ot)
void GPENCIL_OT_primitive_circle(struct wmOperatorType *ot)
void GPENCIL_OT_primitive_box(struct wmOperatorType *ot)
void GPENCIL_OT_select(struct wmOperatorType *ot)
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_trace_image(struct wmOperatorType *ot)
void GPENCIL_OT_draw(struct wmOperatorType *ot)
void GPENCIL_OT_guide_rotate(struct wmOperatorType *ot)
void GPENCIL_OT_primitive_polyline(struct wmOperatorType *ot)
void GPENCIL_OT_select_box(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_color_levels(struct wmOperatorType *ot)
void GPENCIL_OT_interpolate_sequence(struct wmOperatorType *ot)
void GPENCIL_OT_bake_mesh_animation(struct wmOperatorType *ot)
Definition: gpencil_mesh.c:403
void GPENCIL_OT_vertex_color_set(struct wmOperatorType *ot)
void GPENCIL_OT_interpolate_reverse(struct wmOperatorType *ot)
void GPENCIL_OT_extract_palette_vertex(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_color_brightness_contrast(struct wmOperatorType *ot)
void GPENCIL_OT_convert_old_files(struct wmOperatorType *ot)
void GPENCIL_OT_stroke_merge_material(struct wmOperatorType *ot)
void GPENCIL_OT_select_circle(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_paint(struct wmOperatorType *ot)
void GPENCIL_OT_select_alternate(struct wmOperatorType *ot)
void GPENCIL_OT_select_last(struct wmOperatorType *ot)
void GPENCIL_OT_select_less(struct wmOperatorType *ot)
void GPENCIL_OT_select_all(struct wmOperatorType *ot)
void GPENCIL_OT_primitive_line(struct wmOperatorType *ot)
void GPENCIL_OT_vertex_color_invert(struct wmOperatorType *ot)
static void ed_keymap_gpencil_vertexpainting_average(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:402
static bool gpencil_stroke_paintmode_tint_poll(bContext *C)
Definition: gpencil_ops.c:173
static void ed_keymap_gpencil_sculptpainting_grab(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:438
static bool gpencil_stroke_vertexmode_blur_poll(bContext *C)
Definition: gpencil_ops.c:230
void ED_operatormacros_gpencil(void)
Definition: gpencil_ops.c:701
static void ed_keymap_gpencil_sculptpainting_thickness(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:426
static bool gpencil_stroke_vertexmode_smear_poll(bContext *C)
Definition: gpencil_ops.c:242
static bool gpencil_stroke_sculptmode_thickness_poll(bContext *C)
Definition: gpencil_ops.c:259
static bool gpencil_stroke_sculptmode_push_poll(bContext *C)
Definition: gpencil_ops.c:277
static void ed_keymap_gpencil_sculptpainting_push(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:444
static void ed_keymap_gpencil_painting_draw(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:330
static void ed_keymap_gpencil_sculptpainting_twist(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:450
static bool gpencil_stroke_editmode_curve_poll(bContext *C)
Definition: gpencil_ops.c:68
static bool gpencil_stroke_paintmode_draw_poll(bContext *C)
Definition: gpencil_ops.c:155
static bool gpencil_stroke_weightmode_poll(bContext *C)
Definition: gpencil_ops.c:198
static bool gpencil_stroke_paintmode_poll_with_tool(bContext *C, const char gpencil_tool)
Definition: gpencil_ops.c:82
static bool gpencil_stroke_sculptmode_grab_poll(bContext *C)
Definition: gpencil_ops.c:271
static bool gpencil_stroke_vertexmode_average_poll(bContext *C)
Definition: gpencil_ops.c:236
static bool gpencil_stroke_paintmode_fill_poll(bContext *C)
Definition: gpencil_ops.c:167
static void ed_keymap_gpencil_painting_tint(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:351
static void ed_keymap_gpencil_sculptpainting_strength(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:432
static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:312
static void ed_keymap_gpencil_painting_erase(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:337
static void ed_keymap_gpencil_vertexpainting_smear(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:408
static bool gpencil_stroke_paintmode_poll(bContext *C)
Definition: gpencil_ops.c:75
static bool gpencil_stroke_weightmode_poll_with_tool(bContext *C, const char gpencil_weight_tool)
Definition: gpencil_ops.c:136
static bool gpencil_stroke_vertexmode_poll_with_tool(bContext *C, const char gpencil_vertex_tool)
Definition: gpencil_ops.c:100
static void ed_keymap_gpencil_general(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:53
static bool gpencil_stroke_vertexmode_poll(bContext *C)
Definition: gpencil_ops.c:211
static bool gpencil_stroke_vertexmode_draw_poll(bContext *C)
Definition: gpencil_ops.c:224
static bool gpencil_stroke_editmode_poll(bContext *C)
Definition: gpencil_ops.c:61
static void ed_keymap_gpencil_vertexpainting(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:381
static void ed_keymap_gpencil_sculptpainting_pinch(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:456
static void ed_keymap_gpencil_painting_fill(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:344
void ED_operatortypes_gpencil(void)
Definition: gpencil_ops.c:514
static bool gpencil_stroke_sculptmode_smooth_poll(bContext *C)
Definition: gpencil_ops.c:254
static bool gpencil_stroke_sculptmode_twist_poll(bContext *C)
Definition: gpencil_ops.c:283
static bool gpencil_stroke_sculptmode_strength_poll(bContext *C)
Definition: gpencil_ops.c:265
static bool gpencil_stroke_sculptmode_poll(bContext *C)
Definition: gpencil_ops.c:179
static bool gpencil_stroke_vertexmode_replace_poll(bContext *C)
Definition: gpencil_ops.c:248
void ED_keymap_gpencil(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:482
static bool gpencil_stroke_paintmode_erase_poll(bContext *C)
Definition: gpencil_ops.c:161
static bool gpencil_stroke_sculptmode_pinch_poll(bContext *C)
Definition: gpencil_ops.c:289
static bool gpencil_stroke_sculptmode_randomize_poll(bContext *C)
Definition: gpencil_ops.c:294
static void ed_keymap_gpencil_sculpting(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:366
static void ed_keymap_gpencil_vertexpainting_blur(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:396
static bool gpencil_stroke_weightmode_draw_poll(bContext *C)
Definition: gpencil_ops.c:306
static void ed_keymap_gpencil_sculptpainting_smooth(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:420
static void ed_keymap_gpencil_curve_editing(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:321
static void ed_keymap_gpencil_sculptpainting_clone(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:468
static void ed_keymap_gpencil_painting(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:358
static void ed_keymap_gpencil_weightpainting_draw(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:474
static void ed_keymap_gpencil_vertexpainting_replace(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:414
static void ed_keymap_gpencil_weightpainting(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:374
static bool gpencil_stroke_sculptmode_clone_poll(bContext *C)
Definition: gpencil_ops.c:300
static bool gpencil_stroke_sculptmode_poll_with_tool(bContext *C, const char gpencil_sculpt_tool)
Definition: gpencil_ops.c:118
static void ed_keymap_gpencil_vertexpainting_draw(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:389
static void ed_keymap_gpencil_sculptpainting_randomize(wmKeyConfig *keyconf)
Definition: gpencil_ops.c:462
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
Definition: rna_access.c:6272
char gpencil_weight_tool
char gpencil_vertex_tool
struct BrushGpencilSettings * gpencil_settings
char gpencil_sculpt_tool
char gpencil_tool
GpWeightPaint * gp_weightpaint
GpPaint * gp_paint
GpSculptPaint * gp_sculptpaint
GpVertexPaint * gp_vertexpaint
bool(* poll)(struct bContext *)
wmOperatorType * ot
Definition: wm_files.c:3156
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition: wm_keymap.c:852
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
bool WM_toolsystem_active_tool_is_brush(const bContext *C)