[Bf-blender-cvs] [67f9b94291c] master: Fix sculpt normal update in SculptDraw brush

Pablo Dobarro noreply at git.blender.org
Thu Oct 3 16:56:43 CEST 2019


Commit: 67f9b94291cc60bad9664432ef4f5f632fe54eb3
Author: Pablo Dobarro
Date:   Thu Oct 3 16:28:09 2019 +0200
Branches: master
https://developer.blender.org/rB67f9b94291cc60bad9664432ef4f5f632fe54eb3

Fix sculpt normal update in SculptDraw brush

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5981

===================================================================

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 58e4b67ad42..6e9f62b980c 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2087,10 +2087,12 @@ static void update_sculpt_normal(Sculpt *sd, Object *ob, PBVHNode **nodes, int t
 {
   const Brush *brush = BKE_paint_brush(&sd->paint);
   StrokeCache *cache = ob->sculpt->cache;
+  /* Grab brush does not update the sculpt normal during a stroke */
+  const bool update_normal = !(brush->flag & BRUSH_ORIGINAL_NORMAL) &&
+                             !(brush->sculpt_tool == SCULPT_TOOL_GRAB);
 
   if (cache->mirror_symmetry_pass == 0 && cache->radial_symmetry_pass == 0 &&
-      (cache->first_time || !(brush->flag & BRUSH_ORIGINAL_NORMAL)) &&
-      (cache->first_time || !(brush->sculpt_tool & SCULPT_TOOL_GRAB))) {
+      (cache->first_time || update_normal)) {
     calc_sculpt_normal(sd, ob, nodes, totnode, cache->sculpt_normal);
     if (brush->falloff_shape == PAINT_FALLOFF_SHAPE_TUBE) {
       project_plane_v3_v3v3(cache->sculpt_normal, cache->sculpt_normal, cache->view_normal);



More information about the Bf-blender-cvs mailing list