28 #define DNA_DEPRECATED_ALLOW
97 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
124 for (
int i = 0; i < gpencil->
totcol; i++) {
172 if (gps->editcurve !=
NULL) {
212 if (gpd->palettes.first !=
NULL) {
232 gpl->runtime.icon_id = 0;
249 if (gps->editcurve !=
NULL) {
303 .struct_size =
sizeof(
bGPdata),
305 .name_plural =
"grease_pencils",
308 .asset_type_info =
NULL,
315 .foreach_cache =
NULL,
316 .foreach_path =
NULL,
324 .blend_read_undo_preserve =
NULL,
326 .lib_override_apply_post =
NULL,
371 for (
int i = 0; i < gps->
totpoints; i++) {
383 if (editcurve ==
NULL) {
438 gpf_next = gpf->
next;
452 mask_next =
mask->next;
467 gpl_next = gpl->
next;
532 if (gf->framenum == cframe) {
538 if (gf->framenum > cframe) {
549 &
LOG,
"Frame (%d) existed already for this layer_active. Using existing frame", cframe);
558 else if (
state == 0) {
587 if (gpf->framenum > cframe) {
594 if (gpf->framenum == cframe) {
607 if (found ==
false) {
623 const bool setactive,
624 const bool add_to_header)
644 if (gpl_active ==
NULL) {
793 bGPDframe *gpf,
int mat_idx,
int totpoints,
short thickness,
const bool insert_at_head)
798 if ((gps !=
NULL) && (gpf !=
NULL)) {
799 if (!insert_at_head) {
836 if (gps_src ==
NULL) {
856 const bool dup_points,
857 const bool dup_curve)
898 if (gpf_src ==
NULL) {
924 if ((gpf_src ==
NULL) || (gpf_dst ==
NULL)) {
938 const bool dup_frames,
939 const bool dup_strokes)
945 if (gpl_src ==
NULL) {
1069 if (gpd_src ==
NULL) {
1073 if (internal_copy) {
1108 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
1131 bool is_selected =
false;
1172 int cfra = (gpf) ? gpf->
framenum : 0;
1259 for (; gpf; gpf = gpf->
next) {
1274 if ((found) && (gpf->
framenum == cframe)) {
1296 for (; gpf; gpf = gpf->
prev) {
1305 if ((found) && (gpf->
framenum == cframe)) {
1332 if (
abs(cframe - first) >
abs(cframe - last)) {
1353 if ((found) && (gpf->
framenum == cframe)) {
1398 bool changed =
false;
1421 if (name[0] ==
'\0') {
1429 if (name[0] ==
'\0') {
1459 mask_next =
mask->next;
1489 if (gpl_mask !=
NULL) {
1493 mask->sort_index = 0;
1543 if (thunk !=
NULL) {
1544 *((
bool *)thunk) =
true;
1595 if (first_if_not_found) {
1633 if (gpl == layer_active) {
1743 *r_index = ob->
actcol - 1;
1829 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
1853 if (gps->dvert !=
NULL) {
1854 for (
int i = 0; i < gps->totpoints; i++) {
1855 dvert = &gps->dvert[i];
1861 for (
int g = 0;
g < totgrp;
g++) {
1879 if (active_index > def_nr) {
1907 if (gpf->framenum < *r_initframe) {
1908 *r_initframe = gpf->framenum;
1910 if (gpf->framenum > *r_endframe) {
1911 *r_endframe = gpf->framenum;
1924 if (cur_falloff ==
NULL) {
1954 if ((gps->mat_nr > index) || (gps->mat_nr > totcol - 1)) {
1968 if (gps->mat_nr == index) {
1979 const unsigned int *remap,
1980 unsigned int remap_len)
1982 const short remap_len_short = (short)remap_len;
1984 #define MAT_NR_REMAP(n) \
1985 if (n < remap_len_short) { \
1986 BLI_assert(n >= 0 && remap[n] < remap_len_short); \
2004 const float hue_threshold,
2005 const float sat_threshold,
2006 const float val_threshold,
2009 bool changed =
false;
2022 for (
int idx_primary = 0; idx_primary < *totcol; idx_primary++) {
2025 if (ma_primary ==
NULL) {
2028 for (
int idx_secondary = 0; idx_secondary < *totcol; idx_secondary++) {
2029 if ((idx_secondary == idx_primary) ||
2039 if ((ma_secondary ==
NULL) ||
2043 gp_style_primary = ma_primary->
gp_style;
2044 gp_style_secondary = ma_secondary->
gp_style;
2046 if ((gp_style_primary ==
NULL) || (gp_style_secondary ==
NULL) ||
2052 if (gp_style_primary->
mode != gp_style_secondary->
mode) {
2073 float s_hsv_a[3], s_hsv_b[3], f_hsv_a[3], f_hsv_b[3],
col[3];
2090 if ((!
compare_ff(s_hsv_a[0], s_hsv_b[0], hue_threshold)) ||
2091 (!
compare_ff(s_hsv_a[1], s_hsv_b[1], sat_threshold)) ||
2092 (!
compare_ff(s_hsv_a[2], s_hsv_b[2], val_threshold)) ||
2093 (!
compare_ff(f_hsv_a[0], f_hsv_b[0], hue_threshold)) ||
2094 (!
compare_ff(f_hsv_a[1], f_hsv_b[1], sat_threshold)) ||
2095 (!
compare_ff(f_hsv_a[2], f_hsv_b[2], val_threshold)) ||
2123 const float hue_threshold,
2124 const float sat_threshold,
2125 const float val_threshold,
2140 ob, hue_threshold, sat_threshold, val_threshold, mat_table);
2155 if (gp_style !=
NULL) {
2203 for (
short i = 0; i < *totcol; i++) {
2205 if (ma == read_ma) {
2217 for (
short i = 0; i < *totcol; i++) {
2243 const char *hexcol[] = {
2244 "FFFFFF",
"F2F2F2",
"E6E6E6",
"D9D9D9",
"CCCCCC",
"BFBFBF",
"B2B2B2",
"A6A6A6",
"999999",
2245 "8C8C8C",
"808080",
"737373",
"666666",
"595959",
"4C4C4C",
"404040",
"333333",
"262626",
2246 "1A1A1A",
"000000",
"F2FC24",
"FFEA00",
"FEA711",
"FE8B68",
"FB3B02",
"FE3521",
"D00000",
2247 "A81F3D",
"780422",
"2B0000",
"F1E2C5",
"FEE4B3",
"FEDABB",
"FEC28E",
"D88F57",
"BD6340",
2248 "A2402B",
"63352D",
"6B2833",
"34120C",
"E7CB8F",
"D1B38B",
"C1B17F",
"D7980B",
"FFB100",
2249 "FE8B00",
"FF6A00",
"B74100",
"5F3E1D",
"3B2300",
"FECADA",
"FE65CB",
"FE1392",
"DD3062",
2250 "C04A6D",
"891688",
"4D2689",
"441521",
"2C1139",
"241422",
"FFFF7D",
"FFFF00",
"FF7F00",
2251 "FF7D7D",
"FF7DFF",
"FF00FE",
"FF007F",
"FF0000",
"7F0000",
"0A0A00",
"F6FDFF",
"E9F7FF",
2252 "CFE6FE",
"AAC7FE",
"77B3FE",
"1E74FD",
"0046AA",
"2F4476",
"003052",
"0E0E25",
"EEF5F0",
2253 "D6E5DE",
"ACD8B9",
"6CADC6",
"42A9AF",
"007F7F",
"49675C",
"2E4E4E",
"1D3239",
"0F1C21",
2254 "D8FFF4",
"B8F4F5",
"AECCB5",
"76C578",
"358757",
"409B68",
"468768",
"1F512B",
"2A3C37",
2255 "122E1D",
"EFFFC9",
"E6F385",
"BCF51C",
"D4DC18",
"82D322",
"5C7F00",
"59932B",
"297F00",
2256 "004320",
"1C3322",
"00FF7F",
"00FF00",
"7DFF7D",
"7DFFFF",
"00FFFF",
"7D7DFF",
"7F00FF",
2257 "0000FF",
"3F007F",
"00007F"};
2265 const char *palette_id =
"Palette";
2268 if (palette ==
NULL) {
2273 if (palette ==
NULL) {
2279 for (
int i = 0; i <
ARRAY_SIZE(hexcol); i++) {
2306 if (ibuf && ibuf->
rect) {
2307 int img_x = ibuf->
x;
2308 int img_y = ibuf->
y;
2312 for (
int row = 0; row < img_y; row++) {
2364 if ((gpl->viewlayername[0] !=
'\0') && (!
STREQ(view_layer->
name, gpl->viewlayername))) {
2407 layer_cb(gpl, act_gpf,
NULL, thunk);
2412 if (gps->totpoints == 0) {
2415 stroke_cb(gpl, act_gpf, gps, thunk);
2451 bool is_before_first =
false;
2456 float prev_opacity = gpl->opacity;
2470 if ((view_layer !=
NULL) && (gpl->viewlayername[0] !=
'\0') &&
2471 (!
STREQ(view_layer->
name, gpl->viewlayername))) {
2475 gpl->opacity = 0.0f;
2483 sta_gpf = end_gpf =
NULL;
2487 gpf->runtime.onion_id = 0;
2489 if (gpf->framenum < act_gpf->
framenum) {
2490 gpf->runtime.onion_id = -1;
2493 gpf->runtime.onion_id = 1;
2497 if (sta_gpf ==
NULL) {
2500 end_gpf = gpf->
next;
2509 bGPDframe *gpf_first = gpl->frames.first;
2511 is_before_first =
true;
2513 if ((gpf_first !=
NULL) && (act_gpf ==
NULL)) {
2514 act_gpf = gpf_first;
2515 is_before_first =
true;
2527 bool is_wrong_keytype = (onion_keytype > -1) && (gpf->key_type != onion_keytype);
2529 int delta = (onion_mode_abs) ? (gpf->framenum - cfra) :
2532 if (is_before_first) {
2536 if (onion_mode_sel) {
2540 is_in_range = (-delta <= gpd->
gstep) && (delta <= gpd->gstep_next);
2542 if (onion_loop && !is_in_range) {
2546 delta += (delta < 0) ? (shift + 1) : -(shift + 1);
2548 is_in_range = (-delta <= gpd->
gstep) && (delta <= gpd->gstep_next);
2552 gpf->runtime.onion_id = (is_wrong_keytype || !is_in_range) ? INT_MAX : delta;
2555 if (!is_before_first || is_drawing) {
2560 sta_gpf = gpl->frames.first;
2565 end_gpf = sta_gpf =
NULL;
2568 if (sta_gpf ==
NULL && act_gpf ==
NULL) {
2570 layer_cb(gpl, act_gpf,
NULL, thunk);
2572 gpl->opacity = prev_opacity;
2577 for (
bGPDframe *gpf = sta_gpf; gpf && gpf != end_gpf; gpf = gpf->
next) {
2578 if ((gpf->runtime.onion_id == INT_MAX || gpf == act_gpf) && (!is_before_first)) {
2583 if (is_before_first && gpf == act_gpf) {
2584 is_before_first =
false;
2588 layer_cb(gpl, gpf,
NULL, thunk);
2593 if (gps->totpoints == 0) {
2596 stroke_cb(gpl, gpf, gps, thunk);
2602 act_gpf = gpl->actframe;
2606 layer_cb(gpl, act_gpf,
NULL, thunk);
2612 gpl->opacity = prev_opacity;
2617 if (gps->totpoints == 0) {
2620 stroke_cb(gpl, act_gpf, gps, thunk);
2626 gpl->opacity = prev_opacity;
2637 if (gps_eval !=
NULL) {
2641 for (
int i = 0; i < gps_orig->totpoints; i++) {
2653 gps_eval = gps_eval->
next;
2668 if (gpf_eval !=
NULL) {
2672 gpf_eval = gpf_eval->
next;
2686 if (gpl_eval !=
NULL) {
2690 gpl_eval = gpl_eval->
next;
2708 float diff_mat[4][4])
2716 if (obparent_eval ==
NULL) {
2736 float tmp_mat[4][4];
2760 float cur_mat[4][4];
2763 bool changed =
false;
2782 gpf_start = gpl->frames.first;
2787 if (gpl->actframe ==
NULL) {
2790 gpf_start = gpl->actframe;
2791 gpf_end = gpl->actframe->
next;
2794 if (gpl->parent !=
NULL) {
2800 else if (gpl->partype ==
PARBONE) {
2802 if (pchan !=
NULL) {
2815 float tmp_mat[4][4];
2817 transformed |= !
equals_m4m4(gpl->layer_mat, tmp_mat);
2823 if (!changed && !transformed) {
2828 for (
bGPDframe *gpf = gpf_start; gpf !=
NULL && gpf != gpf_end; gpf = gpf->
next) {
2830 if (gpf->runtime.onion_id == INT_MAX) {
2835 if (changed || transformed) {
2839 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2857 const int name_prefix_len = strlen(name_prefix);
2858 for (
int i = 0; i < ob->
totcol; i++) {
2875 if ((gpl !=
NULL) && (!is_multiedit) && (gpl != gpl_iter)) {
2880 if (((gpf == gpl->
actframe) && (!is_multiedit)) ||
2966 if (update_actframe) {
3005 for (
int i = 0; i < gps->
totpoints; i++) {
3049 .gpd_eval = gpd_eval,
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)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
@ GP_UPDATE_NODE_LIGHT_COPY
@ GP_UPDATE_NODE_FULL_COPY
void BKE_gpencil_free_update_cache(struct bGPdata *gpd)
void BKE_gpencil_traverse_update_cache(GPencilUpdateCache *cache, GPencilUpdateCacheTraverseSettings *ts, void *user_data)
bool BKE_icon_delete(int icon_id)
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
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 BKE_libblock_free_data(struct ID *id, bool do_id_user) ATTR_NONNULL()
void id_us_min(struct ID *id)
void * BKE_libblock_alloc(struct Main *bmain, short type, const char *name, 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_IDSUPER(_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)
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)
@ BKE_MAT_ASSIGN_USERPREF
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)
bool BLI_ghash_haskey(const 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_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghash_len(const GHash *gh) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
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_findlinkfrom(struct Link *start, int number) ATTR_WARN_UNUSED_RESULT
void void BLI_freelistN(struct ListBase *listbase) 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)
void BLI_remlink(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 * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT 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, 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])
#define mul_m4_series(...)
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_v2_v2(float r[2], const float a[2])
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 void copy_v2_v2_short(short r[2], const short a[2])
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, size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_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)
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
bool DEG_is_active(const 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)
#define ID_IS_LINKED(_id)
@ 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)
@ GP_LAYER_DISABLE_MASKS_IN_VIEWLAYER
#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)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const Depsgraph * depsgraph
SyclQueue void void size_t num_bytes void
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
void BKE_gpencil_update_on_write(bGPdata *gpd_orig, bGPdata *gpd_eval)
static bool gpencil_update_on_write_layer_cb(GPencilUpdateCache *gpl_cache, void *user_data)
Material * BKE_gpencil_object_material_ensure_from_active_input_toolsettings(Main *bmain, Object *ob, ToolSettings *ts)
static bool gpencil_update_on_write_stroke_cb(GPencilUpdateCache *gps_cache, void *user_data)
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)
bGPDlayer * BKE_gpencil_layer_addnew(bGPdata *gpd, const char *name, const bool setactive, const bool add_to_header)
void BKE_gpencil_frame_range_selected(bGPDlayer *gpl, int *r_initframe, int *r_endframe)
void BKE_gpencil_layer_mask_copy(const bGPDlayer *gpl_src, bGPDlayer *gpl_dst)
void BKE_gpencil_stats_update(bGPdata *gpd)
int BKE_gpencil_object_material_get_index_from_brush(Object *ob, Brush *brush)
void BKE_gpencil_stroke_copy_settings(const bGPDstroke *gps_src, bGPDstroke *gps_dst)
void BKE_gpencil_batch_cache_free(bGPdata *gpd)
void BKE_gpencil_layer_mask_cleanup_all_layers(bGPdata *gpd)
void BKE_gpencil_material_remap(struct bGPdata *gpd, const unsigned int *remap, unsigned int remap_len)
void BKE_gpencil_layer_copy_settings(const bGPDlayer *gpl_src, bGPDlayer *gpl_dst)
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)
bool BKE_gpencil_layer_is_editable(const bGPDlayer *gpl)
void(* BKE_gpencil_batch_cache_dirty_tag_cb)(bGPdata *gpd)
struct tGPencilUpdateOnWriteTraverseData tGPencilUpdateOnWriteTraverseData
bool BKE_gpencil_can_avoid_full_copy_on_write(const Depsgraph *depsgraph, bGPdata *gpd)
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_layer_original_pointers_update(const struct bGPDlayer *gpl_orig, const struct bGPDlayer *gpl_eval)
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_visible_stroke_iter(bGPdata *gpd, gpIterCb layer_cb, gpIterCb stroke_cb, void *thunk)
void BKE_gpencil_frame_copy_settings(const bGPDframe *gpf_src, bGPDframe *gpf_dst)
void BKE_gpencil_palette_ensure(Main *bmain, Scene *scene)
Material * BKE_gpencil_object_material_from_brush_get(Object *ob, Brush *brush)
void BKE_gpencil_visible_stroke_advanced_iter(ViewLayer *view_layer, Object *ob, gpIterCb layer_cb, gpIterCb stroke_cb, void *thunk, bool do_onion, int cfra)
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)
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)
void BKE_gpencil_layer_mask_cleanup(bGPdata *gpd, bGPDlayer *gpl)
int BKE_gpencil_object_material_index_get(Object *ob, Material *ma)
void BKE_gpencil_data_copy_settings(const bGPdata *gpd_src, bGPdata *gpd_dst)
void BKE_gpencil_frame_selected_hash(bGPdata *gpd, struct GHash *r_list)
void BKE_gpencil_data_update_orig_pointers(const bGPdata *gpd_orig, const bGPdata *gpd_eval)
void BKE_gpencil_vgroup_remove(Object *ob, bDeformGroup *defgroup)
bGPDcurve * BKE_gpencil_stroke_curve_duplicate(bGPDcurve *gpc_src)
void BKE_gpencil_free_data(bGPdata *gpd, bool free_all)
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 bool gpencil_update_on_write_frame_cb(GPencilUpdateCache *gpf_cache, void *user_data)
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)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
bool active
all scheduled work for the GPU.
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
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
struct GPencilUpdateCache * update_cache
ListBase vertex_group_names
float curve_edit_corner_angle
int curve_edit_resolution
int vertex_group_active_index
float curve_edit_threshold