Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2022-08-01 17:29:52 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2022-08-01 17:29:52 +0300
commitbe0449cfcae25ff64540e3859232481826f675fb (patch)
tree80f663b543f27c97e39f6265ea119abc512b6c6a /source/blender/editors/sculpt_paint/paint_mask.c
parent49bccd7740622d287f82e4c9b73bfc81d9a22584 (diff)
parent3393b7137e247383477eb38d938239fbb9221680 (diff)
Merge branch 'master' into sculpt_curve_collisionssculpt_curve_collisions
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_mask.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index 89bbf2a3c92..a5389f7fd83 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -663,7 +663,7 @@ static bool sculpt_gesture_is_effected_lasso(SculptGestureContext *sgcontext, co
static bool sculpt_gesture_is_vertex_effected(SculptGestureContext *sgcontext, PBVHVertexIter *vd)
{
float vertex_normal[3];
- SCULPT_vertex_normal_get(sgcontext->ss, vd->index, vertex_normal);
+ SCULPT_vertex_normal_get(sgcontext->ss, vd->vertex, vertex_normal);
float dot = dot_v3v3(sgcontext->view_normal, vertex_normal);
const bool is_effected_front_face = !(sgcontext->front_faces_only && dot < 0.0f);
@@ -743,7 +743,7 @@ static void face_set_gesture_apply_task_cb(void *__restrict userdata,
BKE_pbvh_vertex_iter_begin (sgcontext->ss->pbvh, node, vd, PBVH_ITER_UNIQUE) {
if (sculpt_gesture_is_vertex_effected(sgcontext, &vd)) {
- SCULPT_vertex_face_set_set(sgcontext->ss, vd.index, face_set_operation->new_face_set_id);
+ SCULPT_vertex_face_set_set(sgcontext->ss, vd.vertex, face_set_operation->new_face_set_id);
any_updated = true;
}
}
@@ -1025,7 +1025,9 @@ static void sculpt_gesture_trim_calculate_depth(SculptGestureContext *sgcontext)
trim_operation->depth_back = -FLT_MAX;
for (int i = 0; i < totvert; i++) {
- const float *vco = SCULPT_vertex_co_get(ss, i);
+ PBVHVertRef vertex = BKE_pbvh_index_to_vertex(ss->pbvh, i);
+
+ const float *vco = SCULPT_vertex_co_get(ss, vertex);
/* Convert the coordinates to world space to calculate the depth. When generating the trimming
* mesh, coordinates are first calculated in world space, then converted to object space to
* store them. */
@@ -1437,7 +1439,7 @@ static void project_line_gesture_apply_task_cb(void *__restrict userdata,
}
add_v3_v3(vd.co, disp);
if (vd.mvert) {
- BKE_pbvh_vert_mark_update(sgcontext->ss->pbvh, vd.index);
+ BKE_pbvh_vert_mark_update(sgcontext->ss->pbvh, vd.vertex);
}
any_updated = true;
}