Blender  V3.3
BKE_gpencil.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. */
3 
4 #pragma once
5 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 struct BlendDataReader;
15 struct Brush;
16 struct CurveMapping;
17 struct Depsgraph;
18 struct GHash;
19 struct GPencilUpdateCache;
20 struct ListBase;
21 struct MDeformVert;
22 struct Main;
23 struct Material;
24 struct Object;
25 struct Scene;
26 struct SpaceImage;
27 struct ToolSettings;
28 struct ViewLayer;
29 struct bDeformGroup;
30 struct bGPDcurve;
31 struct bGPDframe;
32 struct bGPDlayer;
33 struct bGPDlayer_Mask;
34 struct bGPDstroke;
35 struct bGPdata;
36 
37 #define GPENCIL_SIMPLIFY(scene) \
38  ((scene->r.mode & R_SIMPLIFY) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ENABLE))
39 #define GPENCIL_SIMPLIFY_ONPLAY(playing) \
40  (((playing == true) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY)) || \
41  ((scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY) == 0))
42 #define GPENCIL_SIMPLIFY_FILL(scene, playing) \
43  ((GPENCIL_SIMPLIFY_ONPLAY(playing) && GPENCIL_SIMPLIFY(scene) && \
44  (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_FILL)))
45 #define GPENCIL_SIMPLIFY_MODIF(scene) \
46  ((GPENCIL_SIMPLIFY(scene) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_MODIFIER)))
47 #define GPENCIL_SIMPLIFY_FX(scene, playing) \
48  ((GPENCIL_SIMPLIFY_ONPLAY(playing) && GPENCIL_SIMPLIFY(scene) && \
49  (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_FX)))
50 #define GPENCIL_SIMPLIFY_TINT(scene) \
51  (GPENCIL_SIMPLIFY(scene) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_TINT))
52 #define GPENCIL_SIMPLIFY_AA(scene) \
53  (GPENCIL_SIMPLIFY(scene) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_AA))
54 
55 /* Vertex Color macros. */
56 #define GPENCIL_USE_VERTEX_COLOR(toolsettings) \
57  (((toolsettings)->gp_paint->mode == GPPAINT_FLAG_USE_VERTEXCOLOR))
58 #define GPENCIL_USE_VERTEX_COLOR_STROKE(toolsettings, brush) \
59  ((GPENCIL_USE_VERTEX_COLOR(toolsettings) && \
60  (((brush)->gpencil_settings->vertex_mode == GPPAINT_MODE_STROKE) || \
61  ((brush)->gpencil_settings->vertex_mode == GPPAINT_MODE_BOTH))))
62 #define GPENCIL_USE_VERTEX_COLOR_FILL(toolsettings, brush) \
63  ((GPENCIL_USE_VERTEX_COLOR(toolsettings) && \
64  (((brush)->gpencil_settings->vertex_mode == GPPAINT_MODE_FILL) || \
65  ((brush)->gpencil_settings->vertex_mode == GPPAINT_MODE_BOTH))))
66 #define GPENCIL_TINT_VERTEX_COLOR_STROKE(brush) \
67  (((brush)->gpencil_settings->vertex_mode == GPPAINT_MODE_STROKE) || \
68  ((brush)->gpencil_settings->vertex_mode == GPPAINT_MODE_BOTH))
69 #define GPENCIL_TINT_VERTEX_COLOR_FILL(brush) \
70  (((brush)->gpencil_settings->vertex_mode == GPPAINT_MODE_FILL) || \
71  ((brush)->gpencil_settings->vertex_mode == GPPAINT_MODE_BOTH))
72 
73 /* ------------ Grease-Pencil API ------------------ */
74 
75 /* clean vertex groups weights */
80 void BKE_gpencil_free_stroke(struct bGPDstroke *gps);
82 bool BKE_gpencil_free_strokes(struct bGPDframe *gpf);
84 void BKE_gpencil_free_frames(struct bGPDlayer *gpl);
86 void BKE_gpencil_free_layers(struct ListBase *list);
88 void BKE_gpencil_free_data(struct bGPdata *gpd, bool free_all);
93 void BKE_gpencil_eval_delete(struct bGPdata *gpd_eval);
94 void BKE_gpencil_free_layer_masks(struct bGPDlayer *gpl);
100 void BKE_gpencil_tag(struct bGPdata *gpd);
101 
103 void BKE_gpencil_batch_cache_free(struct bGPdata *gpd);
104 
109 void BKE_gpencil_stroke_sync_selection(struct bGPdata *gpd, struct bGPDstroke *gps);
110 void BKE_gpencil_curve_sync_selection(struct bGPdata *gpd, struct bGPDstroke *gps);
112 void BKE_gpencil_stroke_select_index_set(struct bGPdata *gpd, struct bGPDstroke *gps);
115 
122 struct bGPDframe *BKE_gpencil_frame_addnew(struct bGPDlayer *gpl, int cframe);
129 struct bGPDframe *BKE_gpencil_frame_addcopy(struct bGPDlayer *gpl, int cframe);
138 struct bGPDlayer *BKE_gpencil_layer_addnew(struct bGPdata *gpd,
139  const char *name,
140  bool setactive,
141  bool add_to_header);
148 struct bGPdata *BKE_gpencil_data_addnew(struct Main *bmain, const char name[]);
149 
155 struct bGPDframe *BKE_gpencil_frame_duplicate(const struct bGPDframe *gpf_src, bool dup_strokes);
161 struct bGPDlayer *BKE_gpencil_layer_duplicate(const struct bGPDlayer *gpl_src,
162  bool dup_frames,
163  bool dup_strokes);
164 
168 void BKE_gpencil_data_copy_settings(const struct bGPdata *gpd_src, struct bGPdata *gpd_dst);
169 
173 void BKE_gpencil_layer_copy_settings(const struct bGPDlayer *gpl_src, struct bGPDlayer *gpl_dst);
174 
178 void BKE_gpencil_frame_copy_settings(const struct bGPDframe *gpf_src, struct bGPDframe *gpf_dst);
179 
183 void BKE_gpencil_stroke_copy_settings(const struct bGPDstroke *gps_src,
184  struct bGPDstroke *gps_dst);
185 
191 void BKE_gpencil_frame_copy_strokes(struct bGPDframe *gpf_src, struct bGPDframe *gpf_dst);
192 /* Create a hash with the list of selected frame number. */
193 void BKE_gpencil_frame_selected_hash(struct bGPdata *gpd, struct GHash *r_list);
194 
195 /* Make a copy of a given gpencil stroke editcurve */
204 struct bGPDstroke *BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src,
205  bool dup_points,
206  bool dup_curve);
207 
214  const struct bGPdata *gpd,
215  bool internal_copy);
216 
222 void BKE_gpencil_frame_delete_laststroke(struct bGPDlayer *gpl, struct bGPDframe *gpf);
223 
224 /* materials */
231 void BKE_gpencil_material_index_reassign(struct bGPdata *gpd, int totcol, int index);
238 bool BKE_gpencil_material_index_used(struct bGPdata *gpd, int index);
245 void BKE_gpencil_material_remap(struct bGPdata *gpd,
246  const unsigned int *remap,
247  unsigned int remap_len);
258  float hue_threshold,
259  float sat_threshold,
260  float val_threshold,
261  struct GHash *r_mat_table);
271 bool BKE_gpencil_merge_materials(struct Object *ob,
272  float hue_threshold,
273  float sat_threshold,
274  float val_threshold,
275  int *r_removed);
276 
277 /* statistics functions */
282 void BKE_gpencil_stats_update(struct bGPdata *gpd);
283 
291 struct bGPDstroke *BKE_gpencil_stroke_new(int mat_idx, int totpoints, short thickness);
302  struct bGPDframe *gpf, int mat_idx, int totpoints, short thickness, bool insert_at_head);
303 
315  struct bGPDstroke *existing,
316  int mat_idx,
317  int totpoints,
318  short thickness);
319 
321 
322 /* Stroke and Fill - Alpha Visibility Threshold */
323 #define GPENCIL_ALPHA_OPACITY_THRESH 0.001f
324 #define GPENCIL_STRENGTH_MIN 0.003f
325 
331 bool BKE_gpencil_layer_is_editable(const struct bGPDlayer *gpl);
332 
333 /* How gpencil_layer_getframe() should behave when there
334  * is no existing GP-Frame on the frame requested.
335  */
336 typedef enum eGP_GetFrame_Mode {
337  /* Use the preceding gp-frame (i.e. don't add anything) */
339 
340  /* Add a new empty/blank frame */
342  /* Make a copy of the active frame */
345 
357  int cframe,
358  eGP_GetFrame_Mode addnew);
365 struct bGPDframe *BKE_gpencil_layer_frame_find(struct bGPDlayer *gpl, int cframe);
372 bool BKE_gpencil_layer_frame_delete(struct bGPDlayer *gpl, struct bGPDframe *gpf);
373 
380 struct bGPDlayer *BKE_gpencil_layer_named_get(struct bGPdata *gpd, const char *name);
386 struct bGPDlayer *BKE_gpencil_layer_active_get(struct bGPdata *gpd);
392 void BKE_gpencil_layer_active_set(struct bGPdata *gpd, struct bGPDlayer *active);
398 void BKE_gpencil_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl);
404 void BKE_gpencil_layer_autolock_set(struct bGPdata *gpd, bool unlock);
405 
412 struct bGPDlayer_Mask *BKE_gpencil_layer_mask_add(struct bGPDlayer *gpl, const char *name);
424 void BKE_gpencil_layer_mask_remove_ref(struct bGPdata *gpd, const char *name);
431 struct bGPDlayer_Mask *BKE_gpencil_layer_mask_named_get(struct bGPDlayer *gpl, const char *name);
437 void BKE_gpencil_layer_mask_sort(struct bGPdata *gpd, struct bGPDlayer *gpl);
442 void BKE_gpencil_layer_mask_sort_all(struct bGPdata *gpd);
446 void BKE_gpencil_layer_mask_copy(const struct bGPDlayer *gpl_src, struct bGPDlayer *gpl_dst);
450 void BKE_gpencil_layer_mask_cleanup(struct bGPdata *gpd, struct bGPDlayer *gpl);
455 
461 void BKE_gpencil_layer_frames_sort(struct bGPDlayer *gpl, bool *r_has_duplicate_frames);
462 
464  char *name,
465  int first_if_not_found);
466 
467 /* Brush */
473 struct Material *BKE_gpencil_brush_material_get(struct Brush *brush);
479 void BKE_gpencil_brush_material_set(struct Brush *brush, struct Material *material);
480 
481 /* Object */
496  struct Object *ob,
497  struct Brush *brush);
505 int BKE_gpencil_object_material_ensure(struct Main *bmain,
506  struct Object *ob,
507  struct Material *material);
509  struct Object *ob,
510  const char *name,
511  int *r_index);
512 
521 struct Material *BKE_gpencil_object_material_new(struct Main *bmain,
522  struct Object *ob,
523  const char *name,
524  int *r_index);
525 
532 int BKE_gpencil_object_material_index_get(struct Object *ob, struct Material *ma);
533 int BKE_gpencil_object_material_index_get_by_name(struct Object *ob, const char *name);
534 
542  struct Brush *brush);
549 int BKE_gpencil_object_material_get_index_from_brush(struct Object *ob, struct Brush *brush);
550 
558  struct Main *bmain, struct Object *ob, struct ToolSettings *ts);
567  struct Object *ob,
568  struct Brush *brush);
576 
583 
584 /* vertex groups */
589 void BKE_gpencil_dvert_ensure(struct bGPDstroke *gps);
595 void BKE_gpencil_vgroup_remove(struct Object *ob, struct bDeformGroup *defgroup);
601 void BKE_gpencil_stroke_weights_duplicate(struct bGPDstroke *gps_src, struct bGPDstroke *gps_dst);
602 
603 /* Set active frame by layer. */
609 void BKE_gpencil_frame_active_set(struct Depsgraph *depsgraph, struct bGPdata *gpd);
610 
619 void BKE_gpencil_frame_range_selected(struct bGPDlayer *gpl, int *r_initframe, int *r_endframe);
629  struct bGPDframe *gpf, int actnum, int f_init, int f_end, struct CurveMapping *cur_falloff);
630 
636 void BKE_gpencil_palette_ensure(struct Main *bmain, struct Scene *scene);
637 
648  struct SpaceImage *sima, struct bGPdata *gpd, struct bGPDframe *gpf, float size, bool mask);
649 
650 /* Iterators */
654 typedef void (*gpIterCb)(struct bGPDlayer *layer,
655  struct bGPDframe *frame,
656  struct bGPDstroke *stroke,
657  void *thunk);
658 
660  gpIterCb layer_cb,
661  gpIterCb stroke_cb,
662  void *thunk);
663 
665  struct Object *ob,
666  gpIterCb layer_cb,
667  gpIterCb stroke_cb,
668  void *thunk,
669  bool do_onion,
670  int cfra);
671 
672 extern void (*BKE_gpencil_batch_cache_dirty_tag_cb)(struct bGPdata *gpd);
673 extern void (*BKE_gpencil_batch_cache_free_cb)(struct bGPdata *gpd);
674 
680 void BKE_gpencil_frame_original_pointers_update(const struct bGPDframe *gpf_orig,
681  const struct bGPDframe *gpf_eval);
682 
683 void BKE_gpencil_layer_original_pointers_update(const struct bGPDlayer *gpl_orig,
684  const struct bGPDlayer *gpl_eval);
690 void BKE_gpencil_update_orig_pointers(const struct Object *ob_orig, const struct Object *ob_eval);
691 
697 void BKE_gpencil_data_update_orig_pointers(const struct bGPdata *gpd_orig,
698  const struct bGPdata *gpd_eval);
699 
708  struct Object *obact,
709  struct bGPDlayer *gpl,
710  float diff_mat[4][4]);
711 
718 
725 int BKE_gpencil_material_find_index_by_name_prefix(struct Object *ob, const char *name_prefix);
726 
727 void BKE_gpencil_blend_read_data(struct BlendDataReader *reader, struct bGPdata *gpd);
728 
730  struct bGPdata *gpd);
731 
732 void BKE_gpencil_update_on_write(struct bGPdata *gpd_orig, struct bGPdata *gpd_eval);
733 
734 #ifdef __cplusplus
735 }
736 #endif
void BKE_gpencil_eval_delete(struct bGPdata *gpd_eval)
Definition: gpencil.c:498
bool BKE_gpencil_free_strokes(struct bGPDframe *gpf)
Definition: gpencil.c:414
void BKE_gpencil_curve_sync_selection(struct bGPdata *gpd, struct bGPDstroke *gps)
Definition: gpencil.c:1120
void BKE_gpencil_stroke_select_index_set(struct bGPdata *gpd, struct bGPDstroke *gps)
Definition: gpencil.c:1155
struct Material * BKE_gpencil_brush_material_get(struct Brush *brush)
Definition: gpencil.c:1675
struct bGPDframe * BKE_gpencil_frame_addnew(struct bGPDlayer *gpl, int cframe)
Definition: gpencil.c:514
void BKE_gpencil_layer_active_set(struct bGPdata *gpd, struct bGPDlayer *active)
Definition: gpencil.c:1601
struct Material * BKE_gpencil_object_material_new(struct Main *bmain, struct Object *ob, const char *name, int *r_index)
Definition: gpencil.c:1734
struct Material * BKE_gpencil_object_material_ensure_by_name(struct Main *bmain, struct Object *ob, const char *name, int *r_index)
Definition: gpencil.c:2228
struct bGPDlayer_Mask * BKE_gpencil_layer_mask_named_get(struct bGPDlayer *gpl, const char *name)
Definition: gpencil.c:1427
void BKE_gpencil_free_data(struct bGPdata *gpd, bool free_all)
Definition: gpencil.c:479
void BKE_gpencil_layer_mask_sort(struct bGPdata *gpd, struct bGPDlayer *gpl)
Definition: gpencil.c:1484
struct bGPDstroke * BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src, bool dup_points, bool dup_curve)
Definition: gpencil.c:855
struct bGPDframe * BKE_gpencil_frame_duplicate(const struct bGPDframe *gpf_src, bool dup_strokes)
bool BKE_gpencil_material_index_used(struct bGPdata *gpd, int index)
Definition: gpencil.c:1963
void BKE_gpencil_batch_cache_dirty_tag(struct bGPdata *gpd)
Definition: gpencil.c:335
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
Definition: gpencil.c:1558
struct bGPDframe * BKE_gpencil_frame_addcopy(struct bGPDlayer *gpl, int cframe)
Definition: gpencil.c:567
void BKE_gpencil_free_stroke_weights(struct bGPDstroke *gps)
Definition: gpencil.c:361
int BKE_gpencil_object_material_ensure(struct Main *bmain, struct Object *ob, struct Material *material)
Definition: gpencil.c:1720
void BKE_gpencil_material_remap(struct bGPdata *gpd, const unsigned int *remap, unsigned int remap_len)
Definition: gpencil.c:1978
void BKE_gpencil_material_index_reassign(struct bGPdata *gpd, int totcol, int index)
Definition: gpencil.c:1948
void BKE_gpencil_layer_mask_sort_all(struct bGPdata *gpd)
Definition: gpencil.c:1499
float BKE_gpencil_multiframe_falloff_calc(struct bGPDframe *gpf, int actnum, int f_init, int f_end, struct CurveMapping *cur_falloff)
Definition: gpencil.c:1917
struct Material * BKE_gpencil_object_material_ensure_active(struct Object *ob)
Definition: gpencil.c:1807
struct bGPDlayer * BKE_gpencil_layer_duplicate(const struct bGPDlayer *gpl_src, bool dup_frames, bool dup_strokes)
void BKE_gpencil_frame_delete_laststroke(struct bGPDlayer *gpl, struct bGPDframe *gpf)
Definition: gpencil.c:1169
void BKE_gpencil_layer_mask_copy(const struct bGPDlayer *gpl_src, struct bGPDlayer *gpl_dst)
void BKE_gpencil_free_point_weights(struct MDeformVert *dvert)
Definition: gpencil.c:353
void BKE_gpencil_palette_ensure(struct Main *bmain, struct Scene *scene)
Definition: gpencil.c:2241
struct bGPDcurve * BKE_gpencil_stroke_editcurve_new(int tot_curve_points)
Definition: gpencil.c:821
void(* gpIterCb)(struct bGPDlayer *layer, struct bGPDframe *frame, struct bGPDstroke *stroke, void *thunk)
Definition: BKE_gpencil.h:654
void BKE_gpencil_stroke_select_index_reset(struct bGPDstroke *gps)
Definition: gpencil.c:1161
struct bGPDstroke * BKE_gpencil_stroke_add_existing_style(struct bGPDframe *gpf, struct bGPDstroke *existing, int mat_idx, int totpoints, short thickness)
Definition: gpencil.c:810
void BKE_gpencil_free_frames(struct bGPDlayer *gpl)
Definition: gpencil.c:427
struct bGPDcurve * BKE_gpencil_stroke_curve_duplicate(struct bGPDcurve *gpc_src)
Definition: gpencil.c:844
void BKE_gpencil_layer_mask_remove(struct bGPDlayer *gpl, struct bGPDlayer_Mask *mask)
Definition: gpencil.c:1446
struct bGPDlayer_Mask * BKE_gpencil_layer_mask_add(struct bGPDlayer *gpl, const char *name)
Definition: gpencil.c:1435
void BKE_gpencil_frame_active_set(struct Depsgraph *depsgraph, struct bGPdata *gpd)
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive, bool add_to_header)
Definition: gpencil.c:621
void BKE_gpencil_layer_frames_sort(struct bGPDlayer *gpl, bool *r_has_duplicate_frames)
Definition: gpencil.c:1553
void BKE_gpencil_layer_original_pointers_update(const struct bGPDlayer *gpl_orig, const struct bGPDlayer *gpl_eval)
Definition: gpencil.c:2663
bool BKE_gpencil_can_avoid_full_copy_on_write(const struct Depsgraph *depsgraph, struct bGPdata *gpd)
void BKE_gpencil_stroke_copy_settings(const struct bGPDstroke *gps_src, struct bGPDstroke *gps_dst)
void BKE_gpencil_dvert_ensure(struct bGPDstroke *gps)
Definition: gpencil.c:1891
bool BKE_gpencil_layer_is_editable(const struct bGPDlayer *gpl)
bool BKE_gpencil_layer_frame_delete(struct bGPDlayer *gpl, struct bGPDframe *gpf)
Definition: gpencil.c:1396
void BKE_gpencil_stats_update(struct bGPdata *gpd)
Definition: gpencil.c:2180
struct bGPDstroke * BKE_gpencil_stroke_add(struct bGPDframe *gpf, int mat_idx, int totpoints, short thickness, bool insert_at_head)
Definition: gpencil.c:792
bool BKE_gpencil_from_image(struct SpaceImage *sima, struct bGPdata *gpd, struct bGPDframe *gpf, float size, bool mask)
Definition: gpencil.c:2290
void BKE_gpencil_layer_mask_remove_ref(struct bGPdata *gpd, const char *name)
Definition: gpencil.c:1453
void BKE_gpencil_visible_stroke_iter(struct bGPdata *gpd, gpIterCb layer_cb, gpIterCb stroke_cb, void *thunk)
Definition: gpencil.c:2389
void BKE_gpencil_data_copy_settings(const struct bGPdata *gpd_src, struct bGPdata *gpd_dst)
void BKE_gpencil_visible_stroke_advanced_iter(struct ViewLayer *view_layer, struct Object *ob, gpIterCb layer_cb, gpIterCb stroke_cb, void *thunk, bool do_onion, int cfra)
Definition: gpencil.c:2430
int BKE_gpencil_object_material_index_get_by_name(struct Object *ob, const char *name)
Definition: gpencil.c:2213
struct Material * BKE_gpencil_object_material_ensure_from_active_input_material(struct Object *ob)
Definition: gpencil.c:1797
void BKE_gpencil_data_update_orig_pointers(const struct bGPdata *gpd_orig, const struct bGPdata *gpd_eval)
bool BKE_gpencil_stroke_select_check(const struct bGPDstroke *gps)
struct Material * BKE_gpencil_object_material_ensure_from_active_input_brush(struct Main *bmain, struct Object *ob, struct Brush *brush)
Definition: gpencil.c:1780
void BKE_gpencil_blend_read_data(struct BlendDataReader *reader, struct bGPdata *gpd)
Definition: gpencil.c:183
int BKE_gpencil_object_material_index_get(struct Object *ob, struct Material *ma)
Definition: gpencil.c:2199
struct bGPDstroke * BKE_gpencil_stroke_new(int mat_idx, int totpoints, short thickness)
Definition: gpencil.c:756
void BKE_gpencil_update_on_write(struct bGPdata *gpd_orig, struct bGPdata *gpd_eval)
Definition: gpencil.c:3029
void BKE_gpencil_free_layer_masks(struct bGPDlayer *gpl)
Definition: gpencil.c:447
void BKE_gpencil_frame_copy_settings(const struct bGPDframe *gpf_src, struct bGPDframe *gpf_dst)
void BKE_gpencil_frame_range_selected(struct bGPDlayer *gpl, int *r_initframe, int *r_endframe)
Definition: gpencil.c:1900
void BKE_gpencil_frame_original_pointers_update(const struct bGPDframe *gpf_orig, const struct bGPDframe *gpf_eval)
Definition: gpencil.c:2630
void BKE_gpencil_layer_mask_cleanup(struct bGPdata *gpd, struct bGPDlayer *gpl)
Definition: gpencil.c:1516
void BKE_gpencil_update_layer_transforms(const struct Depsgraph *depsgraph, struct Object *ob)
void BKE_gpencil_free_stroke_editcurve(struct bGPDstroke *gps)
Definition: gpencil.c:377
struct bGPDlayer * BKE_gpencil_layer_named_get(struct bGPdata *gpd, const char *name)
Definition: gpencil.c:1419
struct bGPDframe * BKE_gpencil_layer_frame_find(struct bGPDlayer *gpl, int cframe)
Definition: gpencil.c:1216
bool BKE_gpencil_merge_materials(struct Object *ob, float hue_threshold, float sat_threshold, float val_threshold, int *r_removed)
Definition: gpencil.c:2122
struct bGPDlayer * BKE_gpencil_layer_get_by_name(struct bGPdata *gpd, char *name, int first_if_not_found)
Definition: gpencil.c:1576
void BKE_gpencil_free_stroke(struct bGPDstroke *gps)
Definition: gpencil.c:391
struct Material * BKE_gpencil_object_material_ensure_from_active_input_toolsettings(struct Main *bmain, struct Object *ob, struct ToolSettings *ts)
Definition: gpencil.c:1768
struct Material * BKE_gpencil_object_material_from_brush_get(struct Object *ob, struct Brush *brush)
Definition: gpencil.c:1748
void BKE_gpencil_vgroup_remove(struct Object *ob, struct bDeformGroup *defgroup)
Definition: gpencil.c:1840
struct bGPDframe * BKE_gpencil_layer_frame_get(struct bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
Definition: gpencil.c:1232
int BKE_gpencil_object_material_get_index_from_brush(struct Object *ob, struct Brush *brush)
Definition: gpencil.c:1759
void(* BKE_gpencil_batch_cache_dirty_tag_cb)(struct bGPdata *gpd)
Definition: gpencil.c:332
struct bGPdata * BKE_gpencil_data_addnew(struct Main *bmain, const char name[])
Definition: gpencil.c:705
void BKE_gpencil_update_orig_pointers(const struct Object *ob_orig, const struct Object *ob_eval)
void BKE_gpencil_layer_transform_matrix_get(const struct Depsgraph *depsgraph, struct Object *obact, struct bGPDlayer *gpl, float diff_mat[4][4])
struct Material * BKE_gpencil_object_material_ensure_from_brush(struct Main *bmain, struct Object *ob, struct Brush *brush)
Definition: gpencil.c:1702
bool BKE_gpencil_merge_materials_table_get(struct Object *ob, float hue_threshold, float sat_threshold, float val_threshold, struct GHash *r_mat_table)
Definition: gpencil.c:2003
int BKE_gpencil_material_find_index_by_name_prefix(struct Object *ob, const char *name_prefix)
Definition: gpencil.c:2855
void BKE_gpencil_batch_cache_free(struct bGPdata *gpd)
Definition: gpencil.c:343
void BKE_gpencil_frame_copy_strokes(struct bGPDframe *gpf_src, struct bGPDframe *gpf_dst)
Definition: gpencil.c:920
void BKE_gpencil_layer_mask_cleanup_all_layers(struct bGPdata *gpd)
Definition: gpencil.c:1525
void BKE_gpencil_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl)
Definition: gpencil.c:1653
struct bGPdata * BKE_gpencil_data_duplicate(struct Main *bmain, const struct bGPdata *gpd, bool internal_copy)
void BKE_gpencil_free_layers(struct ListBase *list)
Definition: gpencil.c:456
void(* BKE_gpencil_batch_cache_free_cb)(struct bGPdata *gpd)
Definition: gpencil.c:333
void BKE_gpencil_stroke_weights_duplicate(struct bGPDstroke *gps_src, struct bGPDstroke *gps_dst)
Definition: gpencil.c:834
void BKE_gpencil_tag(struct bGPdata *gpd)
Definition: gpencil.c:506
void BKE_gpencil_frame_selected_hash(struct bGPdata *gpd, struct GHash *r_list)
Definition: gpencil.c:2869
void BKE_gpencil_brush_material_set(struct Brush *brush, struct Material *material)
Definition: gpencil.c:1687
eGP_GetFrame_Mode
Definition: BKE_gpencil.h:336
@ GP_GETFRAME_ADD_NEW
Definition: BKE_gpencil.h:341
@ GP_GETFRAME_ADD_COPY
Definition: BKE_gpencil.h:343
@ GP_GETFRAME_USE_PREV
Definition: BKE_gpencil.h:338
void BKE_gpencil_layer_autolock_set(struct bGPdata *gpd, bool unlock)
Definition: gpencil.c:1623
void BKE_gpencil_layer_copy_settings(const struct bGPDlayer *gpl_src, struct bGPDlayer *gpl_dst)
void BKE_gpencil_stroke_sync_selection(struct bGPdata *gpd, struct bGPDstroke *gps)
Definition: gpencil.c:1092
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
Scene scene
Material material
const Depsgraph * depsgraph
SyclQueue void void size_t num_bytes void
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
bool active
all scheduled work for the GPU.
Definition: BKE_main.h:121