[Bf-blender-cvs] [53c03d4679f] master: Fix Face Set operators not modifying sigle poly Face Sets
Pablo Dobarro
noreply at git.blender.org
Thu Mar 12 20:39:18 CET 2020
Commit: 53c03d4679f6ed94cac341af0d11a3a8495083a7
Author: Pablo Dobarro
Date: Thu Mar 12 12:27:02 2020 +0100
Branches: master
https://developer.blender.org/rB53c03d4679f6ed94cac341af0d11a3a8495083a7
Fix Face Set operators not modifying sigle poly Face Sets
The face_set_set function which sets a face sets given a vertex index
can ignore all modifications to hidden face sets, so we can skip all
vertex visibility checks outside that function. This makes the code
faster, simpler and fixes multiple bugs.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7122
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 6cb4844be41..65cfcd1f8db 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -356,9 +356,6 @@ static void SCULPT_vertex_face_set_set(SculptSession *ss, int index, int face_se
if (ss->face_sets[vert_map->indices[j]] > 0) {
ss->face_sets[vert_map->indices[j]] = abs(face_set);
}
- else {
- ss->face_sets[vert_map->indices[j]] = -abs(face_set);
- }
}
} break;
case PBVH_BMESH:
@@ -3400,7 +3397,7 @@ static void do_draw_face_sets_brush_task_cb_ex(void *__restrict userdata,
vd.index,
tls->thread_id);
- if (fade > 0.05f && SCULPT_vertex_all_face_sets_visible_get(ss, vd.index)) {
+ if (fade > 0.05f) {
SCULPT_vertex_face_set_set(ss, vd.index, ss->cache->paint_face_set);
}
}
@@ -10868,7 +10865,7 @@ static int sculpt_face_set_create_invoke(bContext *C, wmOperator *op, const wmEv
if (mode == SCULPT_FACE_SET_VISIBLE) {
for (int i = 0; i < tot_vert; i++) {
- if (SCULPT_vertex_visible_get(ss, i) && SCULPT_vertex_all_face_sets_visible_get(ss, i)) {
+ if (SCULPT_vertex_visible_get(ss, i)) {
SCULPT_vertex_face_set_set(ss, i, next_face_set);
}
}
More information about the Bf-blender-cvs
mailing list