diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-13 08:15:40 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-13 08:15:40 +0300 |
commit | ade37d8380728a8f40f05c971585f91325c8ad69 (patch) | |
tree | 510b73a6039441a75ae6d5c830dd2cfef9bec06e /source/blender/editors/sculpt_paint/paint_vertex.cc | |
parent | 2edb69f8a600847f195b88deceea5e980ecb61a7 (diff) |
Convert many more uses of MVert
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.cc')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc index a22b5f3276c..2f0ecf1ddd4 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.cc +++ b/source/blender/editors/sculpt_paint/paint_vertex.cc @@ -2070,7 +2070,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) || selection_vert[v_index]) { @@ -2097,11 +2097,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); @@ -3305,7 +3305,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->mvert[v_index]; /* if the vertex is selected for painting. */ if (!use_vert_sel || selection_vert[v_index]) { @@ -3342,7 +3342,7 @@ 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->mvert[v_other_index]; /* Get the direction from the * selected vert to the neighbor. */ |