44 #define DNA_DEPRECATED_ALLOW
112 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
139 for (
int i = 0; i < gpencil->
totcol; i++) {
184 if (gps->editcurve !=
NULL) {
224 if (gpd->palettes.first !=
NULL) {
242 gpl->runtime.icon_id = 0;
259 if (gps->editcurve !=
NULL) {
313 .struct_size =
sizeof(
bGPdata),
315 .name_plural =
"grease_pencils",
324 .foreach_cache =
NULL,
332 .blend_read_undo_preserve =
NULL,
334 .lib_override_apply_post =
NULL,
380 for (
int i = 0; i < gps->
totpoints; i++) {
392 if (editcurve ==
NULL) {
450 gpf_next = gpf->
next;
464 mask_next =
mask->next;
480 gpl_next = gpl->
next;
557 if (gf->framenum == cframe) {
563 if (gf->framenum > cframe) {
574 &
LOG,
"Frame (%d) existed already for this layer_active. Using existing frame", cframe);
583 else if (
state == 0) {
618 if (gpf->framenum > cframe) {
625 if (gpf->framenum == cframe) {
638 if (found ==
false) {
675 if (gpl_active ==
NULL) {
803 const float mat[4][4])
805 for (
int i = 0; i < totpoints; i++) {
872 bGPDframe *gpf,
int mat_idx,
int totpoints,
short thickness,
const bool insert_at_head)
877 if ((gps !=
NULL) && (gpf !=
NULL)) {
878 if (!insert_at_head) {
930 if (gps_src ==
NULL) {
958 const bool dup_points,
959 const bool dup_curve)
1005 if (gpf_src ==
NULL) {
1036 if ((gpf_src ==
NULL) || (gpf_dst ==
NULL)) {
1055 const bool dup_frames,
1056 const bool dup_strokes)
1063 if (gpl_src ==
NULL) {
1082 for (gpf_src = gpl_src->
frames.
first; gpf_src; gpf_src = gpf_src->
next) {
1088 if (gpf_src == gpl_dst->
actframe) {
1112 if (gpd_src ==
NULL) {
1116 if (internal_copy) {
1155 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
1178 bool is_selected =
false;
1226 int cfra = (gpf) ? gpf->
framenum : 0;
1334 for (; gpf; gpf = gpf->
next) {
1347 if ((found) && (gpf->
framenum == cframe)) {
1365 for (; gpf; gpf = gpf->
prev) {
1374 if ((found) && (gpf->
framenum == cframe)) {
1397 if (
abs(cframe - first) >
abs(cframe - last)) {
1418 if ((found) && (gpf->
framenum == cframe)) {
1469 bool changed =
false;
1498 if (name[0] ==
'\0') {
1512 if (name[0] ==
'\0') {
1558 mask_next =
mask->next;
1593 if (gpl_mask !=
NULL) {
1597 mask->sort_index = 0;
1625 if (thunk !=
NULL) {
1626 *((
bool *)thunk) =
true;
1687 if (first_if_not_found) {
1735 if (gpl == layer_active) {
1882 *r_index = ob->
actcol - 1;
2009 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
2037 if (gps->dvert !=
NULL) {
2038 for (
int i = 0; i < gps->totpoints; i++) {
2039 dvert = &gps->dvert[i];
2045 for (
int g = 0; g < totgrp; g++) {
2091 if (gpf->framenum < *r_initframe) {
2092 *r_initframe = gpf->framenum;
2094 if (gpf->framenum > *r_endframe) {
2095 *r_endframe = gpf->framenum;
2116 if (cur_falloff ==
NULL) {
2152 if ((gps->mat_nr > index) || (gps->mat_nr > totcol - 1)) {
2172 if (gps->mat_nr == index) {
2189 const unsigned int *remap,
2190 unsigned int remap_len)
2192 const short remap_len_short = (short)remap_len;
2194 #define MAT_NR_REMAP(n) \
2195 if (n < remap_len_short) { \
2196 BLI_assert(n >= 0 && remap[n] < remap_len_short); \
2223 const float hue_threshold,
2224 const float sat_threshold,
2225 const float val_threshold,
2228 bool changed =
false;
2241 for (
int idx_primary = 0; idx_primary < *totcol; idx_primary++) {
2244 if (ma_primary ==
NULL) {
2247 for (
int idx_secondary = 0; idx_secondary < *totcol; idx_secondary++) {
2248 if ((idx_secondary == idx_primary) ||
2258 if ((ma_secondary ==
NULL) ||
2262 gp_style_primary = ma_primary->
gp_style;
2263 gp_style_secondary = ma_secondary->
gp_style;
2265 if ((gp_style_primary ==
NULL) || (gp_style_secondary ==
NULL) ||
2271 if (gp_style_primary->
mode != gp_style_secondary->
mode) {
2292 float s_hsv_a[3], s_hsv_b[3], f_hsv_a[3], f_hsv_b[3],
col[3];
2309 if ((!
compare_ff(s_hsv_a[0], s_hsv_b[0], hue_threshold)) ||
2310 (!
compare_ff(s_hsv_a[1], s_hsv_b[1], sat_threshold)) ||
2311 (!
compare_ff(s_hsv_a[2], s_hsv_b[2], val_threshold)) ||
2312 (!
compare_ff(f_hsv_a[0], f_hsv_b[0], hue_threshold)) ||
2313 (!
compare_ff(f_hsv_a[1], f_hsv_b[1], sat_threshold)) ||
2314 (!
compare_ff(f_hsv_a[2], f_hsv_b[2], val_threshold)) ||
2351 const float hue_threshold,
2352 const float sat_threshold,
2353 const float val_threshold,
2368 ob, hue_threshold, sat_threshold, val_threshold, mat_table);
2383 if (gp_style !=
NULL) {
2441 for (
short i = 0; i < *totcol; i++) {
2443 if (ma == read_ma) {
2455 for (
short i = 0; i < *totcol; i++) {
2486 const char *hexcol[] = {
2487 "FFFFFF",
"F2F2F2",
"E6E6E6",
"D9D9D9",
"CCCCCC",
"BFBFBF",
"B2B2B2",
"A6A6A6",
"999999",
2488 "8C8C8C",
"808080",
"737373",
"666666",
"595959",
"4C4C4C",
"404040",
"333333",
"262626",
2489 "1A1A1A",
"000000",
"F2FC24",
"FFEA00",
"FEA711",
"FE8B68",
"FB3B02",
"FE3521",
"D00000",
2490 "A81F3D",
"780422",
"2B0000",
"F1E2C5",
"FEE4B3",
"FEDABB",
"FEC28E",
"D88F57",
"BD6340",
2491 "A2402B",
"63352D",
"6B2833",
"34120C",
"E7CB8F",
"D1B38B",
"C1B17F",
"D7980B",
"FFB100",
2492 "FE8B00",
"FF6A00",
"B74100",
"5F3E1D",
"3B2300",
"FECADA",
"FE65CB",
"FE1392",
"DD3062",
2493 "C04A6D",
"891688",
"4D2689",
"441521",
"2C1139",
"241422",
"FFFF7D",
"FFFF00",
"FF7F00",
2494 "FF7D7D",
"FF7DFF",
"FF00FE",
"FF007F",
"FF0000",
"7F0000",
"0A0A00",
"F6FDFF",
"E9F7FF",
2495 "CFE6FE",
"AAC7FE",
"77B3FE",
"1E74FD",
"0046AA",
"2F4476",
"003052",
"0E0E25",
"EEF5F0",
2496 "D6E5DE",
"ACD8B9",
"6CADC6",
"42A9AF",
"007F7F",
"49675C",
"2E4E4E",
"1D3239",
"0F1C21",
2497 "D8FFF4",
"B8F4F5",
"AECCB5",
"76C578",
"358757",
"409B68",
"468768",
"1F512B",
"2A3C37",
2498 "122E1D",
"EFFFC9",
"E6F385",
"BCF51C",
"D4DC18",
"82D322",
"5C7F00",
"59932B",
"297F00",
2499 "004320",
"1C3322",
"00FF7F",
"00FF00",
"7DFF7D",
"7DFFFF",
"00FFFF",
"7D7DFF",
"7F00FF",
2500 "0000FF",
"3F007F",
"00007F"};
2508 const char *palette_id =
"Palette";
2511 if (palette ==
NULL) {
2516 if (palette ==
NULL) {
2522 for (
int i = 0; i <
ARRAY_SIZE(hexcol); i++) {
2548 if (image ==
NULL) {
2558 if (ibuf && ibuf->
rect) {
2559 int img_x = ibuf->
x;
2560 int img_y = ibuf->
y;
2564 for (
int row = 0; row < img_y; row++) {
2616 if ((gpl->viewlayername[0] !=
'\0') && (!
STREQ(view_layer->
name, gpl->viewlayername))) {
2658 bool is_before_first =
false;
2663 float prev_opacity = gpl->opacity;
2677 if ((view_layer !=
NULL) && (gpl->viewlayername[0] !=
'\0') &&
2678 (!
STREQ(view_layer->
name, gpl->viewlayername))) {
2682 gpl->opacity = 0.0f;
2690 sta_gpf = end_gpf =
NULL;
2694 gpf->runtime.onion_id = 0;
2696 if (gpf->framenum < act_gpf->
framenum) {
2697 gpf->runtime.onion_id = -1;
2700 gpf->runtime.onion_id = 1;
2704 if (sta_gpf ==
NULL) {
2707 end_gpf = gpf->
next;
2716 bGPDframe *gpf_first = gpl->frames.first;
2718 is_before_first =
true;
2720 if ((gpf_first !=
NULL) && (act_gpf ==
NULL)) {
2721 act_gpf = gpf_first;
2722 is_before_first =
true;
2734 bool is_wrong_keytype = (onion_keytype > -1) && (gpf->key_type != onion_keytype);
2736 int delta = (onion_mode_abs) ? (gpf->framenum - cfra) :
2739 if (is_before_first) {
2743 if (onion_mode_sel) {
2747 is_in_range = (-delta <= gpd->
gstep) && (delta <= gpd->gstep_next);
2749 if (onion_loop && !is_in_range) {
2753 delta += (delta < 0) ? (shift + 1) : -(shift + 1);
2755 is_in_range = (-delta <= gpd->
gstep) && (delta <= gpd->gstep_next);
2759 gpf->runtime.onion_id = (is_wrong_keytype || !is_in_range) ? INT_MAX : delta;
2762 if (!is_before_first || is_drawing) {
2767 sta_gpf = gpl->frames.first;
2772 end_gpf = sta_gpf =
NULL;
2775 if (sta_gpf ==
NULL && act_gpf ==
NULL) {
2777 layer_cb(gpl, act_gpf,
NULL, thunk);
2779 gpl->opacity = prev_opacity;
2784 for (
bGPDframe *gpf = sta_gpf; gpf && gpf != end_gpf; gpf = gpf->
next) {
2785 if ((gpf->runtime.onion_id == INT_MAX || gpf == act_gpf) && (!is_before_first)) {
2790 if (is_before_first && gpf == act_gpf) {
2791 is_before_first =
false;
2795 layer_cb(gpl, gpf,
NULL, thunk);
2799 if (gps->totpoints == 0) {
2802 stroke_cb(gpl, gpf, gps, thunk);
2807 act_gpf = gpl->actframe;
2811 layer_cb(gpl, act_gpf,
NULL, thunk);
2817 gpl->opacity = prev_opacity;
2822 if (gps->totpoints == 0) {
2825 stroke_cb(gpl, act_gpf, gps, thunk);
2830 gpl->opacity = prev_opacity;
2846 if (gps_eval !=
NULL) {
2850 for (
int i = 0; i < gps_orig->totpoints; i++) {
2862 gps_eval = gps_eval->
next;
2884 if (gpl_eval !=
NULL) {
2890 if (gpf_eval !=
NULL) {
2894 gpf_eval = gpf_eval->
next;
2897 gpl_eval = gpl_eval->
next;
2912 float diff_mat[4][4])
2920 if (obparent_eval ==
NULL) {
2940 float tmp_mat[4][4];
2969 float cur_mat[4][4];
2971 bool changed =
false;
2974 if (gpl->actframe !=
NULL) {
2975 if (gpl->parent !=
NULL) {
2981 else if (gpl->partype ==
PARBONE) {
2983 if (pchan !=
NULL) {
2997 float tmp_mat[4][4];
2999 transformed |= !
equals_m4m4(gpl->layer_mat, tmp_mat);
3005 if (changed || transformed) {
3009 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
3033 const int name_prefix_len = strlen(name_prefix);
3034 for (
int i = 0; i < ob->
totcol; i++) {
3052 if ((gpl !=
NULL) && (!is_multiedit) && (gpl != gpl_iter)) {
3057 if (((gpf == gpl->
actframe) && (!is_multiedit)) ||
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
void BKE_animdata_blend_read_data(struct BlendDataReader *reader, struct AnimData *adt)
void BKE_animdata_blend_write(struct BlendWriter *writer, struct AnimData *adt)
void(* gpIterCb)(struct bGPDlayer *layer, struct bGPDframe *frame, struct bGPDstroke *stroke, void *thunk)
#define GP_PRIM_DATABUF_SIZE
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
bool BKE_icon_delete(const int icon_id)
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
struct ID * BKE_id_copy(struct Main *bmain, const struct ID *id)
void id_us_min(struct ID *id)
void BKE_libblock_free_data(struct ID *id, const bool do_id_user) ATTR_NONNULL()
void * BKE_libblock_alloc(struct Main *bmain, short type, const char *name, const int flag) ATTR_WARN_UNUSED_RESULT
void id_us_plus(struct ID *id)
void BKE_id_blend_write(struct BlendWriter *writer, struct ID *id)
#define BKE_LIB_FOREACHID_PROCESS(_data, _id_super, _cb_flag)
General operations, lookup, etc. for materials.
struct MaterialGPencilStyle * BKE_gpencil_material_settings(struct Object *ob, short act)
struct Material * BKE_object_material_get(struct Object *ob, short act)
@ BKE_MAT_ASSIGN_USERPREF
struct Material * BKE_gpencil_material(struct Object *ob, short act)
struct Material * BKE_gpencil_material_add(struct Main *bmain, const char *name)
void BKE_object_material_assign(struct Main *bmain, struct Object *ob, struct Material *ma, short act, int assign_type)
struct Material * BKE_material_default_gpencil(void)
void BKE_gpencil_material_attr_init(struct Material *ma)
bool BKE_object_material_slot_add(struct Main *bmain, struct Object *ob)
short * BKE_object_material_len_p(struct Object *ob)
struct Palette * BKE_palette_add(struct Main *bmain, const char *name)
void BKE_paint_palette_set(struct Paint *p, struct Palette *palette)
struct PaletteColor * BKE_palette_color_add(struct Palette *palette)
unsigned int BLI_ghash_len(GHash *gh) ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_haskey(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void * BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_listbase_sort(struct ListBase *listbase, int(*cmp)(const void *, const void *)) ATTR_NONNULL(1
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
void void void BLI_listbase_sort_r(ListBase *listbase, int(*cmp)(void *, const void *, const void *), void *thunk) ATTR_NONNULL(1
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int compare_ff(float a, float b, const float max_diff)
void rgb_to_hsv_compat_v(const float rgb[3], float r_hsv[3])
void hex_to_rgb(const char *hexcol, float *r_r, float *r_g, float *r_b)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m4(float m[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
bool equals_m4m4(const float mat1[4][4], const float mat2[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void loc_eul_size_to_mat4(float R[4][4], const float loc[3], const float eul[3], const float size[3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE bool is_one_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE void copy_v2_fl(float r[2], float f)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t len)
#define ARRAY_SET_ITEMS(...)
#define STREQLEN(a, b, n)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define BLO_read_data_address(reader, ptr_p)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
void BLO_read_list(BlendDataReader *reader, struct ListBase *list)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_write_struct_array(writer, struct_name, array_size, data_ptr)
#define BLO_expand(expander, id)
#define BLO_write_struct_list(writer, struct_name, list_ptr)
void BLO_read_pointer_array(BlendDataReader *reader, void **ptr_p)
bool BLO_write_is_undo(BlendWriter *writer)
void BLO_write_pointer_array(BlendWriter *writer, uint num, const void *data_ptr)
#define BLT_I18NCONTEXT_ID_GPENCIL
#define CLOG_ERROR(clg_ref,...)
#define CLOG_STR_ERROR(clg_ref, str)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ GP_BRUSH_MATERIAL_PINNED
#define BEZT_ISSEL_ANY(bezt)
#define GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE
#define GP_DEFAULT_PIX_FACTOR
#define GPENCIL_PLAY_ON(gpd)
#define GP_DEFAULT_CURVE_RESOLUTION
#define GPENCIL_MULTIEDIT_SESSIONS_ON(gpd)
#define GPENCIL_PAINT_MODE(gpd)
#define GP_DEFAULT_GRID_LINES
#define GP_DEFAULT_CURVE_ERROR
@ GP_DATA_SHOW_ONIONSKINS
@ GP_DATA_CURVE_ADAPTIVE_RESOLUTION
@ GP_DATA_STROKE_WEIGHTMODE
@ GP_DATA_STROKE_VERTEXMODE
@ GP_DATA_STROKE_PAINTMODE
@ GP_DATA_STROKE_SCULPTMODE
@ GP_DATA_AUTOLOCK_LAYERS
@ GP_DATA_STROKE_EDITMODE
@ GP_MATERIAL_STROKE_SHOW
void IMB_sampleImageAtLocation(struct ImBuf *ibuf, float x, float y, bool make_linear_rgb, float color[4])
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
static float frame_len(const Frame *frame)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const Depsgraph * depsgraph
Material * BKE_gpencil_object_material_ensure_from_active_input_toolsettings(Main *bmain, Object *ob, ToolSettings *ts)
void BKE_gpencil_tag(bGPdata *gpd)
bool BKE_gpencil_merge_materials_table_get(Object *ob, const float hue_threshold, const float sat_threshold, const float val_threshold, GHash *r_mat_table)
void BKE_gpencil_free_stroke_weights(bGPDstroke *gps)
bool BKE_gpencil_stroke_select_check(const bGPDstroke *gps)
bGPDcurve * BKE_gpencil_stroke_editcurve_new(const int tot_curve_points)
bGPDlayer * BKE_gpencil_layer_active_get(bGPdata *gpd)
void BKE_gpencil_frame_range_selected(bGPDlayer *gpl, int *r_initframe, int *r_endframe)
void BKE_gpencil_stats_update(bGPdata *gpd)
int BKE_gpencil_object_material_get_index_from_brush(Object *ob, Brush *brush)
void BKE_gpencil_batch_cache_free(bGPdata *gpd)
void BKE_gpencil_material_remap(struct bGPdata *gpd, const unsigned int *remap, unsigned int remap_len)
void BKE_gpencil_visible_stroke_iter(ViewLayer *view_layer, Object *ob, gpIterCb layer_cb, gpIterCb stroke_cb, void *thunk, bool do_onion, int cfra)
void BKE_gpencil_free_frames(bGPDlayer *gpl)
static int gpencil_cb_sort_masks(const void *arg1, const void *arg2)
Material * BKE_gpencil_object_material_ensure_by_name(Main *bmain, Object *ob, const char *name, int *r_index)
void BKE_gpencil_free_point_weights(MDeformVert *dvert)
static bool gpencil_is_layer_mask(ViewLayer *view_layer, bGPdata *gpd, bGPDlayer *gpl_mask)
static void greasepencil_blend_read_lib(BlendLibReader *reader, ID *id)
void BKE_gpencil_layer_mask_remove(bGPDlayer *gpl, bGPDlayer_Mask *mask)
bGPDlayer * BKE_gpencil_layer_addnew(bGPdata *gpd, const char *name, bool setactive)
bool BKE_gpencil_layer_is_editable(const bGPDlayer *gpl)
void(* BKE_gpencil_batch_cache_dirty_tag_cb)(bGPdata *gpd)
void BKE_gpencil_stroke_add_points(bGPDstroke *gps, const float *array, const int totpoints, const float mat[4][4])
void BKE_gpencil_free_stroke_editcurve(bGPDstroke *gps)
Material * BKE_gpencil_object_material_ensure_active(Object *ob)
void BKE_gpencil_layer_autolock_set(bGPdata *gpd, const bool unlock)
void BKE_gpencil_free_layers(ListBase *list)
void BKE_gpencil_layer_frames_sort(struct bGPDlayer *gpl, bool *r_has_duplicate_frames)
void BKE_gpencil_stroke_weights_duplicate(bGPDstroke *gps_src, bGPDstroke *gps_dst)
static void greasepencil_blend_write(BlendWriter *writer, ID *id, const void *id_address)
static void greasepencil_free_data(ID *id)
bool BKE_gpencil_free_strokes(bGPDframe *gpf)
Material * BKE_gpencil_object_material_ensure_from_brush(Main *bmain, Object *ob, Brush *brush)
Material * BKE_gpencil_object_material_ensure_from_active_input_material(Object *ob)
void BKE_gpencil_material_index_reassign(bGPdata *gpd, int totcol, int index)
bGPDstroke * BKE_gpencil_stroke_new(int mat_idx, int totpoints, short thickness)
void BKE_gpencil_palette_ensure(Main *bmain, Scene *scene)
Material * BKE_gpencil_object_material_from_brush_get(Object *ob, Brush *brush)
int BKE_gpencil_object_material_ensure(Main *bmain, Object *ob, Material *material)
void BKE_gpencil_free_layer_masks(bGPDlayer *gpl)
void BKE_gpencil_frame_copy_strokes(bGPDframe *gpf_src, struct bGPDframe *gpf_dst)
void BKE_gpencil_stroke_sync_selection(bGPdata *gpd, bGPDstroke *gps)
void BKE_gpencil_dvert_ensure(bGPDstroke *gps)
void BKE_gpencil_free(bGPdata *gpd, bool free_all)
static int gpencil_cb_cmp_frame(void *thunk, const void *a, const void *b)
void BKE_gpencil_update_layer_transforms(const Depsgraph *depsgraph, Object *ob)
int BKE_gpencil_object_material_index_get_by_name(Object *ob, const char *name)
bool BKE_gpencil_from_image(SpaceImage *sima, bGPdata *gpd, bGPDframe *gpf, const float size, const bool mask)
void(* BKE_gpencil_batch_cache_free_cb)(bGPdata *gpd)
bGPDlayer * BKE_gpencil_layer_named_get(bGPdata *gpd, const char *name)
bGPDframe * BKE_gpencil_frame_addnew(bGPDlayer *gpl, int cframe)
void BKE_gpencil_frame_delete_laststroke(bGPDlayer *gpl, bGPDframe *gpf)
bGPDlayer_Mask * BKE_gpencil_layer_mask_add(bGPDlayer *gpl, const char *name)
bGPDframe * BKE_gpencil_frame_duplicate(const bGPDframe *gpf_src, const bool dup_strokes)
void BKE_gpencil_frame_original_pointers_update(const struct bGPDframe *gpf_orig, const struct bGPDframe *gpf_eval)
static void greasepencil_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int UNUSED(flag))
void BKE_gpencil_update_orig_pointers(const Object *ob_orig, const Object *ob_eval)
bGPDframe * BKE_gpencil_layer_frame_find(bGPDlayer *gpl, int cframe)
void BKE_gpencil_stroke_select_index_reset(bGPDstroke *gps)
static void greasepencil_foreach_id(ID *id, LibraryForeachIDData *data)
void BKE_gpencil_layer_mask_remove_ref(bGPdata *gpd, const char *name)
bGPDframe * BKE_gpencil_frame_addcopy(bGPDlayer *gpl, int cframe)
void BKE_gpencil_batch_cache_dirty_tag(bGPdata *gpd)
void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd)
Material * BKE_gpencil_object_material_new(Main *bmain, Object *ob, const char *name, int *r_index)
bool BKE_gpencil_layer_frame_delete(bGPDlayer *gpl, bGPDframe *gpf)
bGPDlayer * BKE_gpencil_layer_get_by_name(bGPdata *gpd, char *name, int first_if_not_found)
float BKE_gpencil_multiframe_falloff_calc(bGPDframe *gpf, int actnum, int f_init, int f_end, CurveMapping *cur_falloff)
bool BKE_gpencil_merge_materials(Object *ob, const float hue_threshold, const float sat_threshold, const float val_threshold, int *r_removed)
void BKE_gpencil_layer_transform_matrix_get(const Depsgraph *depsgraph, Object *obact, bGPDlayer *gpl, float diff_mat[4][4])
int BKE_gpencil_material_find_index_by_name_prefix(Object *ob, const char *name_prefix)
bGPdata * BKE_gpencil_data_addnew(Main *bmain, const char name[])
bGPDlayer_Mask * BKE_gpencil_layer_mask_named_get(bGPDlayer *gpl, const char *name)
void BKE_gpencil_stroke_select_index_set(bGPdata *gpd, bGPDstroke *gps)
void BKE_gpencil_layer_mask_sort_all(bGPdata *gpd)
bGPDstroke * BKE_gpencil_stroke_add(bGPDframe *gpf, int mat_idx, int totpoints, short thickness, const bool insert_at_head)
void BKE_gpencil_eval_delete(bGPdata *gpd_eval)
Material * BKE_gpencil_brush_material_get(Brush *brush)
static void greasepencil_blend_read_expand(BlendExpander *expander, ID *id)
int BKE_gpencil_object_material_index_get(Object *ob, Material *ma)
void BKE_gpencil_frame_selected_hash(bGPdata *gpd, struct GHash *r_list)
void BKE_gpencil_vgroup_remove(Object *ob, bDeformGroup *defgroup)
bGPDcurve * BKE_gpencil_stroke_curve_duplicate(bGPDcurve *gpc_src)
void BKE_gpencil_free_stroke(bGPDstroke *gps)
bGPDstroke * BKE_gpencil_stroke_add_existing_style(bGPDframe *gpf, bGPDstroke *existing, int mat_idx, int totpoints, short thickness)
bGPdata * BKE_gpencil_data_duplicate(Main *bmain, const bGPdata *gpd_src, bool internal_copy)
void BKE_gpencil_curve_sync_selection(bGPdata *gpd, bGPDstroke *gps)
void BKE_gpencil_brush_material_set(Brush *brush, Material *ma)
static void greasepencil_blend_read_data(BlendDataReader *reader, ID *id)
void BKE_gpencil_layer_active_set(bGPdata *gpd, bGPDlayer *active)
bool BKE_gpencil_material_index_used(bGPdata *gpd, int index)
Material * BKE_gpencil_object_material_ensure_from_active_input_brush(Main *bmain, Object *ob, Brush *brush)
void BKE_gpencil_layer_mask_sort(bGPdata *gpd, bGPDlayer *gpl)
bGPDstroke * BKE_gpencil_stroke_duplicate(bGPDstroke *gps_src, const bool dup_points, const bool dup_curve)
bGPDframe * BKE_gpencil_layer_frame_get(bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
bGPDlayer * BKE_gpencil_layer_duplicate(const bGPDlayer *gpl_src, const bool dup_frames, const bool dup_strokes)
void BKE_gpencil_layer_delete(bGPdata *gpd, bGPDlayer *gpl)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
bool active
all scheduled work for the GPU.
struct Material * material
struct BrushGpencilSettings * gpencil_settings
struct MaterialGPencilStyle * gp_style
struct ToolSettings * toolsettings
bGPDcurve_point * curve_points
struct bGPDframe * gpf_orig
bGPDframe_Runtime runtime
struct bGPDlayer_Mask * prev
struct bGPDlayer_Mask * next
struct bGPDlayer * gpl_orig
bGPDlayer_Runtime runtime
float vertex_paint_opacity
struct bGPDspoint * pt_orig
bGPDspoint_Runtime runtime
struct bGPDstroke * gps_orig
bGPDstroke_Runtime runtime
struct bGPDcurve * editcurve
struct MDeformVert * dvert
float curve_edit_corner_angle
int curve_edit_resolution
float curve_edit_threshold
__forceinline const avxi abs(const avxi &a)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)