[Bf-blender-cvs] [895fef5ccba] sculpt-dev: Sculpt: Add area normal test to clay strips for better front faces detection
Pablo Dobarro
noreply at git.blender.org
Sun Apr 18 20:11:47 CEST 2021
Commit: 895fef5ccbac8b051b88c8a4a34821bcf46ff3ae
Author: Pablo Dobarro
Date: Sun Apr 18 20:10:12 2021 +0200
Branches: sculpt-dev
https://developer.blender.org/rB895fef5ccbac8b051b88c8a4a34821bcf46ff3ae
Sculpt: Add area normal test to clay strips for better front faces detection
===================================================================
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 d4b5fa3bb9d..32cdf75f4cc 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1114,6 +1114,7 @@ void SCULPT_tag_update_overlays(bContext *C)
View3D *v3d = CTX_wm_view3d(C);
if (!BKE_sculptsession_use_pbvh_draw(ob, v3d)) {
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
+ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
}
@@ -5689,6 +5690,12 @@ static void do_clay_strips_brush_task_cb_ex(void *__restrict userdata,
continue;
}
+ float vertex_no[3];
+ SCULPT_vertex_normal_get(ss, vd.index, vertex_no);
+ if (dot_v3v3(area_no_sp, vertex_no) <= -0.1f) {
+ continue;
+ }
+
float intr[3];
float val[3];
closest_to_plane_normalized_v3(intr, test.plane_tool, vd.co);
More information about the Bf-blender-cvs
mailing list