111 a->do_mask_normal = do_mask_normal;
112 if (do_mask_normal) {
114 a->angle = (
a->angle_inner + 90.0f) * 0.5f;
117 a->angle_inner =
a->angle =
angle;
122 a->angle_range =
a->angle -
a->angle_inner;
124 if (
a->angle_range <= 0.0f) {
125 a->do_mask_normal =
false;
128 a->angle__cos =
cosf(
a->angle);
129 a->angle_inner__cos =
cosf(
a->angle_inner);
136 if (angle_cos <= a->angle__cos) {
140 if (angle_cos < a->angle_inner__cos) {
141 *mask_p *= (
a->angle -
acosf(angle_cos)) /
a->angle_range;
171 if (dv_prev->
flag == 1) {
184 if (me_eval !=
NULL) {
291 const int brush_alpha_value_i)
305 cp = (
char *)&color_blend;
306 ct = (
char *)&color_test;
307 co = (
char *)&color_orig;
309 for (
a = 0;
a < 4;
a++) {
314 else if (cp[
a] > co[
a]) {
322 else if (cp[
a] > ct[
a]) {
332 cp = (
char *)&color_blend;
333 cc = (
char *)&color_curr;
352 const float co_ss_3d[3] = {co_ss[0], co_ss[1], 0.0f};
366 const float UNUSED(brush_alpha_value),
375 paintval = 1.0f - paintval;
396 CLAMP(weight, 0.0f, 1.0f);
403 if (newval < oldval) {
404 return MIN2(newval, curval);
406 if (newval > oldval) {
407 return MAX2(newval, curval);
413 float weight,
float old_weight,
float locked_weight,
float free_weight,
bool auto_normalize)
417 if (auto_normalize || free_weight <= 0.0f) {
419 weight *= (1.0f - locked_weight);
427 if (old_weight >= free_weight) {
431 else if (weight < 1.0f) {
432 weight = weight * (free_weight - old_weight) / (1 - weight);
445 const int defbase_tot,
446 const bool *vgroup_validmap)
448 float sum = 0.0f, fac;
452 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
453 if (dw->
def_nr < defbase_tot && vgroup_validmap[dw->
def_nr]) {
459 if ((tot == 0) || (
sum == 1.0f)) {
466 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
467 if (dw->
def_nr < defbase_tot && vgroup_validmap[dw->
def_nr]) {
476 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
477 if (dw->
def_nr < defbase_tot && vgroup_validmap[dw->
def_nr]) {
489 const int defbase_tot,
490 const bool *vgroup_validmap,
491 const bool *lock_flags)
493 float sum = 0.0f, fac;
494 float sum_unlock = 0.0f;
495 float lock_weight = 0.0f;
499 if (lock_flags ==
NULL) {
504 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
505 if (dw->
def_nr < defbase_tot && vgroup_validmap[dw->
def_nr]) {
508 if (lock_flags[dw->
def_nr]) {
509 lock_weight += dw->
weight;
529 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
530 if (dw->
def_nr < defbase_tot && vgroup_validmap[dw->
def_nr]) {
531 if (lock_flags[dw->
def_nr] ==
false) {
537 return (lock_weight == 1.0f);
539 if (sum_unlock != 0.0f) {
540 fac = (1.0f - lock_weight) / sum_unlock;
542 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
543 if (dw->
def_nr < defbase_tot && vgroup_validmap[dw->
def_nr]) {
544 if (lock_flags[dw->
def_nr] ==
false) {
554 fac = (1.0f - lock_weight) / tot;
556 CLAMP(fac, 0.0f, 1.0f);
558 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
559 if (dw->
def_nr < defbase_tot && vgroup_validmap[dw->
def_nr]) {
560 if (lock_flags[dw->
def_nr] ==
false) {
575 const int defbase_tot,
576 const bool *vgroup_validmap,
577 const bool *lock_flags,
578 const bool *lock_with_active)
583 dvert, defbase_tot, vgroup_validmap, lock_with_active);
600 static bool has_unselected_unlocked_bone_group(
int defbase_tot,
603 const bool *lock_flags,
604 const bool *vgroup_validmap)
607 if (defbase_tot == selected) {
610 for (i = 0; i < defbase_tot; i++) {
611 if (vgroup_validmap[i] && !defbase_sel[i] && !lock_flags[i]) {
620 const int defbase_tot,
621 const bool *defbase_sel,
627 float change = *change_p;
630 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
631 if (dw->
def_nr < defbase_tot && defbase_sel[dw->
def_nr]) {
633 val = dw->
weight * change;
635 change = 1.0f / dw->
weight;
645 const int defbase_tot,
647 const bool *defbase_sel)
656 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
657 if (dw->
def_nr < defbase_tot && defbase_sel[dw->
def_nr]) {
659 val = dw->
weight * change;
673 const int defbase_tot,
675 const bool *defbase_sel)
681 for (i = dvert->
totweight, dw = dvert->
dw; i != 0; i--, dw++) {
682 if (dw->
def_nr < defbase_tot && defbase_sel[dw->
def_nr]) {
762 float weight_prev, weight_cur;
763 float dw_rel_locked = 0.0f, dw_rel_free = 1.0f;
779 if (index_mirr ==
index && vgroup_mirr == wpi->active.index) {
780 index_mirr = vgroup_mirr = -1;
784 index_mirr = vgroup_mirr = -1;
794 CLAMP(dw_rel_locked, 0.0f, 1.0f);
800 restrict_to_existing =
true;
805 if (restrict_to_existing) {
817 if (index_mirr != -1) {
818 dv_mirr = &me->
dvert[index_mirr];
822 if (dw_mirr ==
NULL) {
823 index_mirr = vgroup_mirr = -1;
828 if (
index != index_mirr) {
834 int dw_offset = (int)(dw - dv_mirr->
dw);
838 if (totweight_prev != dv_mirr->
totweight) {
839 dw = &dv_mirr->
dw[dw_offset];
859 if (index_mirr != -1) {
871 weight_prev = weight_cur;
885 if (index_mirr ==
index) {
899 CLAMP(weight, 0.0f, 1.0f);
908 if (index_mirr != -1) {
930 if (index_mirr != -1) {
933 if (
index != index_mirr) {
979 float curw, curw_real, oldw, neww, change, curw_mirr, change_mirr;
980 float dw_rel_free, dw_rel_locked;
987 dv_mirr = &me->
dvert[index_mirr];
1007 CLAMP(dw_rel_locked, 0.0f, 1.0f);
1015 if (index_mirr != -1) {
1039 change = neww / curw_real;
1044 if (dv_mirr !=
NULL) {
1048 if (curw_mirr == 0.0f) {
1054 float orig = change_mirr = curw_real * change / curw_mirr;
1062 change *= change_mirr / orig;
1073 if (dv_mirr !=
NULL) {
1082 if (dv_mirr !=
NULL) {
1188 for (
int i = 0; i < me->
totvert; i++, dv++) {
1214 ob->
mode |= mode_flag;
1295 ob->
mode &= ~mode_flag;
1374 const bool is_mode_set = (ob->
mode & mode_flag) != 0;
1433 ot->
name =
"Weight Paint Mode";
1434 ot->
idname =
"PAINT_OT_weight_paint_toggle";
1487 float view_dir[3] = {0.0f, 0.0f, 1.0f};
1522 cache->
brush = brush;
1596 int defbase_tot, defbase_tot_sel;
1615 if (vgroup_index.
mirror != -1) {
1634 ob, defbase_tot, defbase_sel, defbase_sel, &defbase_tot_sel);
1637 for (i = 0; i < defbase_tot; i++) {
1638 if (defbase_sel[i]) {
1658 wpd->active.index = vgroup_index.
active;
1679 defbase_tot, wpd->
lock_flags, defbase_sel, defbase_tot_sel))) {
1698 tmpflags =
MEM_mallocN(
sizeof(
bool) * defbase_tot, __func__);
1705 wpd->active.lock = tmpflags;
1711 MEM_callocN(
sizeof(
bool) * defbase_tot, __func__);
1712 tmpflags[wpd->active.index] =
true;
1713 wpd->active.lock = tmpflags;
1716 MEM_callocN(
sizeof(
bool) * defbase_tot, __func__);
1732 for (
int i = 0; i < me->
totvert; i++, dv++) {
1741 static float dot_vf3vs3(
const float brushNormal[3],
const short vertexNormal[3])
1751 float *r_brush_size_pressure,
1752 float *r_brush_alpha_value,
1753 float *r_brush_alpha_pressure)
1778 CLAMP(weight, 0.0f, 1.0f);
1822 const bool has_grids = (pbvh_type ==
PBVH_GRIDS);
1829 float brush_size_pressure, brush_alpha_value, brush_alpha_pressure;
1831 scene, ss, brush, &brush_size_pressure, &brush_alpha_value, &brush_alpha_pressure);
1838 ss, &test,
data->brush->falloff_shape);
1840 ss,
data->brush->falloff_shape);
1846 if (sculpt_brush_test_sq_fn(&test, vd.
co)) {
1851 const float grid_alpha = has_grids ? 1.0f / vd.
gridsize : 1.0f;
1852 const char v_flag =
data->me->mvert[v_index].flag;
1854 if (!(use_face_sel || use_vert_sel) || v_flag &
SELECT) {
1856 int total_hit_loops = 0;
1857 float weight_final = 0.0f;
1860 const MPoly *mp = &
data->me->mpoly[p_index];
1862 total_hit_loops += mp->
totloop;
1863 for (
int k = 0; k < mp->
totloop; k++) {
1865 const MLoop *ml = &
data->me->mloop[l_index];
1866 weight_final +=
data->wpd->precomputed_weight[ml->
v];
1871 if (total_hit_loops != 0) {
1873 const float angle_cos = (use_normal && vd.
no) ?
1882 const float final_alpha = brush_fade *
brush_strength * grid_alpha *
1883 brush_alpha_pressure;
1886 if (ss->
mode.
wpaint.alpha_weight[v_index] < final_alpha) {
1887 ss->
mode.
wpaint.alpha_weight[v_index] = final_alpha;
1894 weight_final /= total_hit_loops;
1897 data->vp,
data->ob,
data->wpi, v_index, final_alpha, weight_final);
1913 const bool has_grids = (pbvh_type ==
PBVH_GRIDS);
1919 float brush_size_pressure, brush_alpha_value, brush_alpha_pressure;
1921 scene, ss, brush, &brush_size_pressure, &brush_alpha_value, &brush_alpha_pressure);
1934 ss, &test,
data->brush->falloff_shape);
1936 ss,
data->brush->falloff_shape);
1942 if (sculpt_brush_test_sq_fn(&test, vd.
co)) {
1947 const float grid_alpha = has_grids ? 1.0f / vd.
gridsize : 1.0f;
1948 const MVert *mv_curr = &
data->me->mvert[v_index];
1951 if (!(use_face_sel || use_vert_sel) || mv_curr->
flag &
SELECT) {
1953 const float angle_cos = (use_normal && vd.
no) ?
1960 bool do_color =
false;
1963 float stroke_dot_max = 0.0f;
1967 float weight_final = 0.0;
1970 const MPoly *mp = &
data->me->mpoly[p_index];
1972 for (
int k = 0; k < mp->
totloop; k++, ml_other++) {
1973 const uint v_other_index = ml_other->
v;
1974 if (v_other_index != v_index) {
1975 const MVert *mv_other = &
data->me->mvert[v_other_index];
1984 const float stroke_dot =
dot_v3v3(other_dir, brush_dir);
1986 if (stroke_dot > stroke_dot_max) {
1987 stroke_dot_max = stroke_dot;
1988 weight_final =
data->wpd->precomputed_weight[v_other_index];
1998 const float final_alpha = brush_fade *
brush_strength * grid_alpha *
1999 brush_alpha_pressure;
2001 if (final_alpha <= 0.0f) {
2006 data->vp,
data->ob,
data->wpi, v_index, final_alpha, (
float)weight_final);
2023 const bool has_grids = (pbvh_type ==
PBVH_GRIDS);
2030 const float paintweight =
data->strength;
2031 float brush_size_pressure, brush_alpha_value, brush_alpha_pressure;
2033 scene, ss, brush, &brush_size_pressure, &brush_alpha_value, &brush_alpha_pressure);
2040 ss, &test,
data->brush->falloff_shape);
2042 ss,
data->brush->falloff_shape);
2048 if (sculpt_brush_test_sq_fn(&test, vd.
co)) {
2054 const float grid_alpha = has_grids ? 1.0f / vd.
gridsize : 1.0f;
2056 const char v_flag =
data->me->mvert[v_index].flag;
2058 if (!(use_face_sel || use_vert_sel) || v_flag &
SELECT) {
2060 const float angle_cos = (use_normal && vd.
no) ?
2069 const float final_alpha = brush_fade *
brush_strength * grid_alpha *
2070 brush_alpha_pressure;
2073 if (ss->
mode.
wpaint.alpha_weight[v_index] < final_alpha) {
2074 ss->
mode.
wpaint.alpha_weight[v_index] = final_alpha;
2096 const bool has_grids = (pbvh_type ==
PBVH_GRIDS);
2108 ss, &test,
data->brush->falloff_shape);
2110 ss,
data->brush->falloff_shape);
2116 if (sculpt_brush_test_sq_fn(&test, vd.
co)) {
2117 const float angle_cos = (use_normal && vd.
no) ?
dot_vf3vs3(sculpt_normal_frontface, vd.
no) :
2119 if (angle_cos > 0.0 &&
2124 const char v_flag =
data->me->mvert[v_index].flag;
2127 if (!(use_face_sel || use_vert_sel) || v_flag &
SELECT) {
2143 data->custom_data = accum;
2150 double accum_weight = 0.0;
2151 for (
int i = 0; i < totnode; i++) {
2152 accum_len += accum[i].
len;
2153 accum_weight += accum[i].
value;
2155 if (accum_len != 0) {
2156 accum_weight /= accum_len;
2247 .dist_ray_to_aabb_precalc = &dist_ray_to_aabb_precalc,
2298 for (
int i = 1; i < wp->
radial_symm[axis -
'X']; i++) {
2300 wpaint_do_paint(
C, ob, wp, sd, wpd, wpi, me, brush, symm, axis, i,
angle);
2318 wpaint_do_paint(
C, ob, wp, sd, wpd, wpi, me, brush, 0,
'X', 0, 0);
2334 for (i = 1; i <= symm; i++) {
2335 if ((symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
2341 wpaint_do_paint(
C, ob, wp, sd, wpd, wpi, me, brush, i,
'X', 0, 0);
2345 wpaint_do_paint(
C, ob, wp, sd, wpd, wpi, me, brush, i,
'Y', 0, 0);
2349 wpaint_do_paint(
C, ob, wp, sd, wpd, wpi, me, brush, i,
'Z', 0, 0);
2403 wpi.active = wpd->active;
2481 if (wpd->active.lock) {
2574 ot->
name =
"Weight Paint";
2575 ot->
idname =
"PAINT_OT_weight_paint";
2576 ot->
description =
"Paint a stroke in the current vertex group's weights";
2606 const bool is_mode_set = (ob->
mode & mode_flag) != 0;
2648 ot->
name =
"Vertex Paint Mode";
2649 ot->
idname =
"PAINT_OT_vertex_paint_toggle";
2650 ot->
description =
"Toggle the vertex paint mode in 3D view";
2797 const bool has_grids = (pbvh_type ==
PBVH_GRIDS);
2803 const bool use_vert_sel = (
data->me->editflag &
2808 memset(accum->
value, 0,
sizeof(accum->
value));
2812 ss, &test,
data->brush->falloff_shape);
2818 if (sculpt_brush_test_sq_fn(&test, vd.
co)) {
2824 if (!use_vert_sel ||
mv->flag &
SELECT) {
2829 col = (
char *)(&lcol[l_index]);
2843 const float v_co[3],
2862 const bool has_grids = (pbvh_type ==
PBVH_GRIDS);
2869 float brush_size_pressure, brush_alpha_value, brush_alpha_pressure;
2871 scene, ss, brush, &brush_size_pressure, &brush_alpha_value, &brush_alpha_pressure);
2873 const bool use_vert_sel = (
data->me->editflag &
2879 ss, &test,
data->brush->falloff_shape);
2881 ss,
data->brush->falloff_shape);
2887 if (sculpt_brush_test_sq_fn(&test, vd.
co)) {
2893 const float grid_alpha = has_grids ? 1.0f / vd.
gridsize : 1.0f;
2897 if (!use_vert_sel ||
mv->flag &
SELECT) {
2901 const float angle_cos = (use_normal && vd.
no) ?
2910 uint color_final =
data->vpd->paintcol;
2913 float tex_alpha = 1.0;
2914 if (
data->vpd->is_texbrush) {
2917 data,
data->vpd->vertexcosnos[v_index].co, &color_final);
2924 const MPoly *mp = &
data->me->mpoly[p_index];
2926 uint color_orig = 0;
2929 if (ss->
mode.
vpaint.previous_color[l_index] == 0) {
2930 ss->
mode.
vpaint.previous_color[l_index] = lcol[l_index];
2932 color_orig = ss->
mode.
vpaint.previous_color[l_index];
2934 const float final_alpha = 255 * brush_fade *
brush_strength * tex_alpha *
2935 brush_alpha_pressure * grid_alpha;
2960 const bool has_grids = (pbvh_type ==
PBVH_GRIDS);
2967 float brush_size_pressure, brush_alpha_value, brush_alpha_pressure;
2969 scene, ss, brush, &brush_size_pressure, &brush_alpha_value, &brush_alpha_pressure);
2971 const bool use_vert_sel = (
data->me->editflag &
2977 ss, &test,
data->brush->falloff_shape);
2979 ss,
data->brush->falloff_shape);
2985 if (sculpt_brush_test_sq_fn(&test, vd.
co)) {
2990 const float grid_alpha = has_grids ? 1.0f / vd.
gridsize : 1.0f;
2994 if (!use_vert_sel ||
mv->flag &
SELECT) {
2996 const float angle_cos = (use_normal && vd.
no) ?
3007 uint color_final = 0;
3008 int total_hit_loops = 0;
3012 const MPoly *mp = &
data->me->mpoly[p_index];
3014 total_hit_loops += mp->
totloop;
3015 for (
int k = 0; k < mp->
totloop; k++) {
3017 const char *
col = (
const char *)(&lcol[l_index]);
3026 if (total_hit_loops != 0) {
3028 char *
col = (
char *)(&color_final);
3040 const MPoly *mp = &
data->me->mpoly[p_index];
3042 uint color_orig = 0;
3045 if (ss->
mode.
vpaint.previous_color[l_index] == 0) {
3046 ss->
mode.
vpaint.previous_color[l_index] = lcol[l_index];
3048 color_orig = ss->
mode.
vpaint.previous_color[l_index];
3051 brush_alpha_pressure * grid_alpha;
3077 const bool has_grids = (pbvh_type ==
PBVH_GRIDS);
3084 float brush_size_pressure, brush_alpha_value, brush_alpha_pressure;
3086 scene, ss, brush, &brush_size_pressure, &brush_alpha_value, &brush_alpha_pressure);
3089 const bool use_vert_sel = (
data->me->editflag &
3100 ss, &test,
data->brush->falloff_shape);
3102 ss,
data->brush->falloff_shape);
3108 if (sculpt_brush_test_sq_fn(&test, vd.
co)) {
3113 const float grid_alpha = has_grids ? 1.0f / vd.
gridsize : 1.0f;
3114 const MVert *mv_curr = &
data->me->mvert[v_index];
3117 if (!use_vert_sel || mv_curr->
flag &
SELECT) {
3121 const float angle_cos = (use_normal && vd.
no) ?
3131 bool do_color =
false;
3134 float stroke_dot_max = 0.0f;
3138 uint color_final = 0;
3144 const MPoly *mp = &
data->me->mpoly[p_index];
3147 for (
int k = 0; k < mp->
totloop; k++, ml_other++) {
3148 const uint v_other_index = ml_other->
v;
3149 if (v_other_index != v_index) {
3150 const MVert *mv_other = &
data->me->mvert[v_other_index];
3160 const float stroke_dot =
dot_v3v3(other_dir, brush_dir);
3162 if (stroke_dot > stroke_dot_max) {
3163 stroke_dot_max = stroke_dot;
3164 color_final =
data->vpd->smear.color_prev[mp->
loopstart + k];
3173 const float final_alpha = 255 * brush_fade *
brush_strength * brush_alpha_pressure *
3182 const MPoly *mp = &
data->me->mpoly[p_index];
3185 uint color_orig = 0;
3188 if (ss->
mode.
vpaint.previous_color[l_index] == 0) {
3189 ss->
mode.
vpaint.previous_color[l_index] = lcol[l_index];
3191 color_orig = ss->
mode.
vpaint.previous_color[l_index];
3202 data->vpd->smear.color_curr[l_index] = lcol[l_index];
3219 data->custom_data = accum;
3226 uint accum_value[3] = {0};
3228 for (
int i = 0; i < totnode; i++) {
3229 accum_len += accum[i].
len;
3230 accum_value[0] += accum[i].
value[0];
3231 accum_value[1] += accum[i].
value[1];
3232 accum_value[2] += accum[i].
value[2];
3234 if (accum_len != 0) {
3323 for (
int i = 1; i < vp->
radial_symm[axis -
'X']; i++) {
3325 vpaint_do_paint(
C, sd, vp, vpd, ob, me, brush, symm, axis, i,
angle);
3343 vpaint_do_paint(
C, sd, vp, vpd, ob, me, brush, i,
'X', 0, 0);
3352 for (i = 1; i <= symm; i++) {
3353 if (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5))) {
3359 vpaint_do_paint(
C, sd, vp, vpd, ob, me, brush, i,
'X', 0, 0);
3363 vpaint_do_paint(
C, sd, vp, vpd, ob, me, brush, i,
'Y', 0, 0);
3367 vpaint_do_paint(
C, sd, vp, vpd, ob, me, brush, i,
'Z', 0, 0);
3515 ot->
name =
"Vertex Paint";
3516 ot->
idname =
"PAINT_OT_vertex_paint";
3517 ot->
description =
"Paint a stroke in the active vertex color layer";
typedef float(TangentPoint)[2]
bool BKE_brush_use_size_pressure(const struct Brush *brush)
float BKE_brush_weight_get(const struct Scene *scene, const struct Brush *brush)
const float * BKE_brush_secondary_color_get(const struct Scene *scene, const struct Brush *brush)
float BKE_brush_alpha_get(const struct Scene *scene, const struct Brush *brush)
const float * BKE_brush_color_get(const struct Scene *scene, const struct Brush *brush)
float BKE_brush_curve_strength(const struct Brush *br, float p, const float len)
int BKE_brush_size_get(const struct Scene *scene, const struct Brush *brush)
void BKE_brush_unprojected_radius_set(struct Scene *scene, struct Brush *brush, float unprojected_radius)
float BKE_brush_sample_tex_3d(const struct Scene *scene, const struct Brush *br, const float point[3], float rgba[4], const int thread, struct ImagePool *pool)
bool BKE_brush_use_alpha_pressure(const struct Brush *brush)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_on_load(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct wmMsgBus * CTX_wm_message_bus(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
void * CustomData_get_layer(const struct CustomData *data, int type)
void BKE_mesh_flush_select_from_verts(struct Mesh *me)
struct Mesh * BKE_mesh_from_object(struct Object *ob)
void BKE_mesh_batch_cache_dirty_tag(struct Mesh *me, eMeshBatchDirtyMode mode)
void BKE_mesh_flush_select_from_polys(struct Mesh *me)
void BKE_mesh_vert_loop_map_create(MeshElemMap **r_map, int **r_mem, const struct MPoly *mpoly, const struct MLoop *mloop, int totvert, int totpoly, int totloop)
void BKE_mesh_vert_poly_map_create(MeshElemMap **r_map, int **r_mem, const struct MPoly *mpoly, const struct MLoop *mloop, int totvert, int totpoly, int totloop)
@ BKE_MESH_BATCH_DIRTY_ALL
General operations, lookup, etc. for blender objects.
struct Mesh * BKE_object_get_evaluated_mesh(struct Object *object)
void BKE_object_free_derived_caches(struct Object *ob)
struct Paint * BKE_paint_get_active_from_paintmode(struct Scene *sce, ePaintMode mode)
void BKE_sculpt_toolsettings_data_ensure(struct Scene *scene)
const char PAINT_CURSOR_VERTEX_PAINT[3]
void BKE_sculpt_update_object_for_edit(struct Depsgraph *depsgraph, struct Object *ob_orig, bool need_pmap, bool need_mask, bool need_colors)
struct Brush * BKE_paint_brush(struct Paint *paint)
void BKE_paint_init(struct Main *bmain, struct Scene *sce, ePaintMode mode, const char col[3])
bool BKE_paint_ensure(struct ToolSettings *ts, struct Paint **r_paint)
void BKE_sculptsession_free(struct Object *ob)
const char PAINT_CURSOR_WEIGHT_PAINT[3]
void BKE_paint_toolslots_brush_validate(struct Main *bmain, struct Paint *paint)
#define BKE_pbvh_vertex_iter_begin(pbvh, node, vi, mode)
PBVHType BKE_pbvh_type(const PBVH *pbvh)
#define BKE_pbvh_vertex_iter_end
void BKE_pbvh_parallel_range_settings(struct TaskParallelSettings *settings, bool use_threading, int totnode)
void BKE_pbvh_update_bounds(PBVH *pbvh, int flags)
void BKE_pbvh_search_gather(PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, PBVHNode ***array, int *tot)
void BKE_report(ReportList *reports, ReportType type, const char *message)
Generic array manipulation API.
#define BLI_array_binary_or(arr, arr_a, arr_b, arr_len)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE unsigned char round_fl_to_uchar(float a)
MINLINE int divide_round_i(int a, int b)
void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
void dist_squared_ray_to_aabb_v3_precalc(struct DistRayAABB_Precalc *neasrest_precalc, const float ray_origin[3], const float ray_direction[3])
void mul_m3_v3(const float M[3][3], float r[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void swap_m4m4(float m1[4][4], float m2[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE float normalize_v3(float r[3])
MINLINE void mul_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void normal_short_to_float_v3(float r[3], const short n[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v4(float r[4])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE void zero_v2(float r[2])
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
void BLI_rcti_union(struct rcti *rct1, const struct rcti *rct2)
bool BLI_rcti_is_empty(const struct rcti *rect)
void BLI_task_parallel_range(const int start, const int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
#define UNUSED_VARS_NDEBUG(...)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_COPY_ON_WRITE
#define ID_IS_LINKED(_id)
@ BRUSH_FRONTFACE_FALLOFF
@ PAINT_FALLOFF_SHAPE_SPHERE
#define ME_USING_MIRROR_X_VERTEX_GROUPS(_me)
@ ME_EDIT_MIRROR_VERTEX_GROUPS
Object is a sort of wrapper for general info.
@ VP_FLAG_VGROUP_RESTRICT
#define OPERATOR_RETVAL_CHECK(ret)
void ED_mesh_mirror_topo_table_end(struct Object *ob)
int mesh_get_x_mirror_vert(struct Object *ob, struct Mesh *me_eval, int index, const bool use_topology)
bool ED_vgroup_sync_from_pose(struct Object *ob)
bool ED_mesh_color_ensure(struct Mesh *me, const char *name)
void ED_mesh_mirror_spatial_table_end(struct Object *ob)
void ED_object_posemode_set_for_weight_paint(struct bContext *C, struct Main *bmain, struct Object *ob, const bool is_mode_set)
bool ED_object_mode_compat_set(struct bContext *C, struct Object *ob, eObjectMode mode, struct ReportList *reports)
void ED_region_tag_redraw_partial(struct ARegion *region, const struct rcti *rct, bool rebuild)
void ED_region_tag_redraw(struct ARegion *region)
void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d)
@ V3D_PROJ_TEST_CLIP_NEAR
void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, struct Object *ob, float r_pmat[4][4])
eV3DProjStatus ED_view3d_project_float_object(const struct ARegion *region, const float co[3], float r_co[2], const eV3DProjTest flag)
void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph)
void view3d_operator_needs_opengl(const struct bContext *C)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
static T sum(const btAlignedObjectArray< T > &items)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const Depsgraph * depsgraph
static CCL_NAMESPACE_BEGIN const double alpha
IconTextureDrawCall normal
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
bool active
all scheduled work for the GPU.
void paint_cursor_delete_textures(void)
void paint_cursor_start(Paint *p, bool(*poll)(bContext *C))
bool ED_wpaint_ensure_data(struct bContext *C, struct ReportList *reports, enum eWPaintFlag flag, struct WPaintVGroupIndex *vgroup_index)
struct PaintStroke * paint_stroke_new(struct bContext *C, struct wmOperator *op, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeRedraw redraw, StrokeDone done, int event_type)
int paint_stroke_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event)
float ED_wpaint_blend_tool(const int tool, const float weight, const float paintval, const float alpha)
void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data)
int paint_stroke_exec(struct bContext *C, struct wmOperator *op)
void paint_stroke_free(struct bContext *C, struct wmOperator *op)
float paint_calc_object_space_radius(struct ViewContext *vc, const float center[3], float pixel_radius)
void ED_vpaint_proj_handle_free(struct VertProjHandle *vp_handle)
struct VertProjHandle * ED_vpaint_proj_handle_create(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct CoNo **r_vcosnos)
bool paint_supports_dynamic_size(struct Brush *br, enum ePaintMode mode)
void * paint_stroke_mode_data(struct PaintStroke *stroke)
unsigned int ED_vpaint_blend_tool(const int tool, const uint col, const uint paintcol, const int alpha_i)
struct ViewContext * paint_stroke_view_context(struct PaintStroke *stroke)
void paint_stroke_cancel(struct bContext *C, struct wmOperator *op)
void paint_stroke_operator_properties(struct wmOperatorType *ot)
static void do_wpaint_brush_smear_task_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
static void wpaint_do_radial_symmetry(bContext *C, Object *ob, VPaint *wp, Sculpt *sd, struct WPaintData *wpd, WeightPaintInfo *wpi, Mesh *me, Brush *brush, const char symm, const int axis)
static int wpaint_exec(bContext *C, wmOperator *op)
static void wpaint_do_symmetrical_brush_actions(bContext *C, Object *ob, VPaint *wp, Sculpt *sd, struct WPaintData *wpd, WeightPaintInfo *wpi)
static float wpaint_blend(const VPaint *wp, float weight, const float alpha, float paintval, const float UNUSED(brush_alpha_value), const short do_flip)
void ED_object_wpaintmode_exit_ex(Object *ob)
void ED_object_vpaintmode_exit_ex(Object *ob)
static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float mouse[2])
static void do_weight_paint_normalize_all(MDeformVert *dvert, const int defbase_tot, const bool *vgroup_validmap)
void ED_object_vpaintmode_exit(struct bContext *C)
void ED_object_wpaintmode_enter_ex(Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob)
static void view_angle_limits_init(struct NormalAnglePrecalc *a, float angle, bool do_mask_normal)
static void vpaint_do_symmetrical_brush_actions(bContext *C, Sculpt *sd, VPaint *vp, struct VPaintData *vpd, Object *ob)
static void vertex_paint_init_stroke(Depsgraph *depsgraph, Object *ob)
static uint vpaint_blend(const VPaint *vp, uint color_curr, uint color_orig, uint color_paint, const int alpha_i, const int brush_alpha_value_i)
void PAINT_OT_weight_paint(wmOperatorType *ot)
static void vertex_paint_init_session_data(const ToolSettings *ts, Object *ob)
static PBVHNode ** vwpaint_pbvh_gather_generic(Object *ob, VPaint *wp, Sculpt *sd, Brush *brush, int *r_totnode)
void PAINT_OT_vertex_paint(wmOperatorType *ot)
static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op)
static float wpaint_get_active_weight(const MDeformVert *dv, const WeightPaintInfo *wpi)
static void get_brush_alpha_data(const Scene *scene, const SculptSession *ss, const Brush *brush, float *r_brush_size_pressure, float *r_brush_alpha_value, float *r_brush_alpha_pressure)
static void wpaint_do_paint(bContext *C, Object *ob, VPaint *wp, Sculpt *sd, struct WPaintData *wpd, WeightPaintInfo *wpi, Mesh *me, Brush *brush, const char symm, const int axis, const int i, const float angle)
static bool weight_paint_poll_ex(bContext *C, bool check_tool)
static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op)
bool weight_paint_mode_poll(bContext *C)
static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
static int vpaint_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool vertex_paint_poll_ex(bContext *C, bool check_tool)
bool weight_paint_poll(bContext *C)
static void vpaint_do_paint(bContext *C, Sculpt *sd, VPaint *vp, struct VPaintData *vpd, Object *ob, Mesh *me, Brush *brush, const char symm, const int axis, const int i, const float angle)
uint vpaint_get_current_col(Scene *scene, VPaint *vp, bool secondary)
static void wpaint_paint_leaves(bContext *C, Object *ob, Sculpt *sd, VPaint *vp, struct WPaintData *wpd, WeightPaintInfo *wpi, Mesh *me, PBVHNode **nodes, int totnode)
static bool brush_use_accumulate_ex(const Brush *brush, const int ob_mode)
static bool multipaint_verify_change(MDeformVert *dvert, const int defbase_tot, float change, const bool *defbase_sel)
static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const float mouse[2])
static int vpaint_exec(bContext *C, wmOperator *op)
static void wpaint_stroke_done(const bContext *C, struct PaintStroke *stroke)
bool vertex_paint_poll_ignore_tool(bContext *C)
static int wpaint_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void ED_object_vpaintmode_enter_ex(Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob)
static bool paint_mode_toggle_poll_test(bContext *C)
static void do_wpaint_brush_draw_task_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
static void calculate_average_color(SculptThreadedTaskData *data, PBVHNode **UNUSED(nodes), int totnode)
static void do_weight_paint_vertex(const VPaint *wp, Object *ob, const WeightPaintInfo *wpi, const uint index, float alpha, float paintweight)
static float wpaint_clamp_monotonic(float oldval, float curval, float newval)
static void do_wpaint_precompute_weight_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
static void do_vpaint_brush_smear_task_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
static bool vwpaint_use_normal(const VPaint *vp)
static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke)
static float dot_vf3vs3(const float brushNormal[3], const short vertexNormal[3])
static void paint_last_stroke_update(Scene *scene, const float location[3])
static void do_vpaint_brush_draw_task_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
static float wpaint_undo_lock_relative(float weight, float old_weight, float locked_weight, float free_weight, bool auto_normalize)
static void do_wpaint_brush_blur_task_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
bool vertex_paint_mode_poll(bContext *C)
bool weight_paint_poll_ignore_tool(bContext *C)
static void vwpaint_update_cache_invariants(bContext *C, const VPaint *vp, SculptSession *ss, wmOperator *op, const float mouse[2])
static void vpaint_paint_leaves(bContext *C, Sculpt *sd, VPaint *vp, struct VPaintData *vpd, Object *ob, Mesh *me, PBVHNode **nodes, int totnode)
static void do_vpaint_brush_calc_average_color_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
static void tex_color_alpha(VPaint *vp, const ViewContext *vc, const float co[3], float r_rgba[4])
static void wpaint_cancel(bContext *C, wmOperator *op)
static void do_vpaint_brush_blur_task_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
static void vertex_paint_init_session(Depsgraph *depsgraph, Scene *scene, Object *ob, eObjectMode object_mode)
static bool brush_use_accumulate(const VPaint *vp)
void PAINT_OT_weight_paint_toggle(wmOperatorType *ot)
static void do_weight_paint_vertex_multi(const VPaint *wp, Object *ob, const WeightPaintInfo *wpi, const uint index, float alpha, float paintweight)
static void multipaint_apply_change(MDeformVert *dvert, const int defbase_tot, float change, const bool *defbase_sel)
static void do_weight_paint_vertex_single(const VPaint *wp, Object *ob, const WeightPaintInfo *wpi, const uint index, float alpha, float paintweight)
static void calculate_average_weight(SculptThreadedTaskData *data, PBVHNode **UNUSED(nodes), int totnode)
static void multipaint_clamp_change(MDeformVert *dvert, const int defbase_tot, const bool *defbase_sel, float *change_p)
static void vpaint_do_radial_symmetry(bContext *C, Sculpt *sd, VPaint *vp, struct VPaintData *vpd, Object *ob, Mesh *me, Brush *brush, const char symm, const int axis)
void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot)
void ED_object_wpaintmode_exit(struct bContext *C)
static float view_angle_limits_apply_falloff(const struct NormalAnglePrecalc *a, float angle_cos, float *mask_p)
static bool vertex_paint_use_fast_update_check(Object *ob)
static void do_weight_paint_normalize_all_locked_try_active(MDeformVert *dvert, const int defbase_tot, const bool *vgroup_validmap, const bool *lock_flags, const bool *lock_with_active)
static MDeformVert * defweight_prev_init(MDeformVert *dvert_prev, MDeformVert *dvert_curr, int index)
static void ed_vwpaintmode_enter_generic(Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob, const eObjectMode mode_flag)
static float tex_color_alpha_ubyte(SculptThreadedTaskData *data, const float v_co[3], uint *r_color)
static void do_wpaint_brush_calc_average_weight_cb_ex(void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
static void vpaint_cancel(bContext *C, wmOperator *op)
static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
struct WeightPaintInfo WeightPaintInfo
void ED_object_vpaintmode_enter(struct bContext *C, Depsgraph *depsgraph)
bool vertex_paint_poll(bContext *C)
static void ed_vwpaintmode_exit_generic(Object *ob, const eObjectMode mode_flag)
static void precompute_weight_values(bContext *C, Object *ob, Brush *brush, struct WPaintData *wpd, WeightPaintInfo *wpi, Mesh *me)
static void vwpaint_update_cache_variants(bContext *C, VPaint *vp, Object *ob, PointerRNA *ptr)
void ED_object_wpaintmode_enter(struct bContext *C, Depsgraph *depsgraph)
static bool do_weight_paint_normalize_all_locked(MDeformVert *dvert, const int defbase_tot, const bool *vgroup_validmap, const bool *lock_flags)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
bool SCULPT_stroke_get_location(bContext *C, float out[3], const float mouse[2])
bool SCULPT_pbvh_calc_area_normal(const Brush *brush, Object *ob, PBVHNode **nodes, int totnode, bool use_threading, float r_area_no[3])
void SCULPT_cache_calc_brushdata_symm(StrokeCache *cache, const char symm, const char axis, const float angle)
const float * SCULPT_brush_frontface_normal_from_falloff_shape(SculptSession *ss, char falloff_shape)
SculptBrushTestFn SCULPT_brush_test_init_with_falloff_shape(SculptSession *ss, SculptBrushTest *test, char falloff_shape)
bool SCULPT_search_sphere_cb(PBVHNode *node, void *data_v)
static float brush_strength(const Sculpt *sd, const StrokeCache *cache, const float feather, const UnifiedPaintSettings *ups)
char SCULPT_mesh_symmetry_xyz_get(Object *object)
bool SCULPT_search_circle_cb(PBVHNode *node, void *data_v)
void SCULPT_cache_free(StrokeCache *cache)
bool SCULPT_get_redraw_rect(ARegion *region, RegionView3D *rv3d, Object *ob, rcti *rect)
bool(* SculptBrushTestFn)(SculptBrushTest *test, const float co[3])
struct CustomData pdata ldata
struct MLoopCol * mloopcol
struct MDeformVert * dvert
struct SculptSession * sculpt
struct Paint_Runtime runtime
struct ParticleSystem * next
struct ToolSettings * toolsettings
struct SculptSession::@54::@55 vpaint
union SculptSession::@54 mode
struct StrokeCache * cache
struct SculptSession::@54::@56 wpaint
struct MeshElemMap * vert_to_loop
struct MeshElemMap * vert_to_poly
const struct Brush * brush
float true_view_normal[3]
float projection_mat[4][4]
float sculpt_normal_symm[3]
float true_last_location[3]
float average_stroke_accum[3]
int average_stroke_counter
struct CoNo * vertexcosnos
struct NormalAnglePrecalc normal_angle_precalc
struct VPaintData::@485 smear
struct VertProjHandle * vp_handle
struct RegionView3D * rv3d
struct WeightPaintGroupData active mirror
struct NormalAnglePrecalc normal_angle_precalc
const bool * vgroup_unlocked
const bool * vgroup_validmap
const bool * vgroup_locked
bool precomputed_weight_ready
float * precomputed_weight
const bool * vgroup_locked
struct WeightPaintGroupData active mirror
const bool * vgroup_unlocked
const bool * vgroup_validmap
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)