diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.cc')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc index 8758d3fa83f..f9f22173c05 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.cc +++ b/source/blender/editors/sculpt_paint/paint_vertex.cc @@ -2065,7 +2065,7 @@ static void do_wpaint_brush_smear_task_cb_ex(void *__restrict userdata, * Otherwise, take the current vert. */ const int v_index = has_grids ? ss->mloop[vd.grid_indices[vd.g]].v : vd.vert_indices[vd.i]; const float grid_alpha = has_grids ? 1.0f / vd.gridsize : 1.0f; - const MVert *mv_curr = &ss->mvert[v_index]; + const float3 &mv_curr = ss->positions[v_index]; /* If the vertex is selected */ if (!(use_face_sel || use_vert_sel) || select_vert[v_index]) { @@ -2092,11 +2092,11 @@ static void do_wpaint_brush_smear_task_cb_ex(void *__restrict userdata, for (int k = 0; k < mp->totloop; k++, ml_other++) { const uint v_other_index = ml_other->v; if (v_other_index != v_index) { - const MVert *mv_other = &ss->mvert[v_other_index]; + const float3 &mv_other = ss->positions[v_other_index]; /* Get the direction from the selected vert to the neighbor. */ float other_dir[3]; - sub_v3_v3v3(other_dir, mv_curr->co, mv_other->co); + sub_v3_v3v3(other_dir, mv_curr, mv_other); project_plane_v3_v3v3(other_dir, other_dir, cache->view_normal); normalize_v3(other_dir); @@ -3302,7 +3302,7 @@ static void do_vpaint_brush_smear(bContext *C, const int v_index = has_grids ? ss->mloop[vd.grid_indices[vd.g]].v : vd.vert_indices[vd.i]; const float grid_alpha = has_grids ? 1.0f / vd.gridsize : 1.0f; - const MVert *mv_curr = &ss->mvert[v_index]; + const float3 &mv_curr = &ss->positions[v_index]; /* if the vertex is selected for painting. */ if (!use_vert_sel || select_vert[v_index]) { @@ -3339,12 +3339,12 @@ static void do_vpaint_brush_smear(bContext *C, for (int k = 0; k < mp->totloop; k++, ml_other++) { const uint v_other_index = ml_other->v; if (v_other_index != v_index) { - const MVert *mv_other = &ss->mvert[v_other_index]; + const float3 &mv_other = &ss->positions[v_other_index]; /* Get the direction from the * selected vert to the neighbor. */ float other_dir[3]; - sub_v3_v3v3(other_dir, mv_curr->co, mv_other->co); + sub_v3_v3v3(other_dir, mv_curr, mv_other); project_plane_v3_v3v3(other_dir, other_dir, cache->view_normal); normalize_v3(other_dir); |