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:
authorPablo Dobarro <pablodp606@gmail.com>2020-03-12 14:27:02 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-03-12 22:38:57 +0300
commit53c03d4679f6ed94cac341af0d11a3a8495083a7 (patch)
treec51ba848630d287bee83f55f523213b789a4b8aa
parent9dcd6ba3eb7de60aed5a6b44fbc6afcdf687f2b8 (diff)
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
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c7
1 files changed, 2 insertions, 5 deletions
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);
}
}