[Bf-blender-cvs] [9df9fb33244] master: Fix T56497: Snake hook sculpt brush slips off and affects the part of the mesh behind

Pablo Dobarro noreply at git.blender.org
Fri Sep 27 17:46:44 CEST 2019


Commit: 9df9fb33244889c37b9bfd5ef938c96f27144fee
Author: Pablo Dobarro
Date:   Fri Sep 27 16:00:57 2019 +0200
Branches: master
https://developer.blender.org/rB9df9fb33244889c37b9bfd5ef938c96f27144fee

Fix T56497: Snake hook sculpt brush slips off and affects the part of the mesh behind

We should not be updating the cache true location there.
This commit also fixes the snake hook default alpha.

Reviewed By: brecht

Maniphest Tasks: T56497

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

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

M	source/blender/blenkernel/intern/brush.c
M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 4df5eb6f263..e697b548678 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -923,6 +923,8 @@ void BKE_brush_sculpt_reset(Brush *br)
       br->alpha = 0.7f;
       break;
     case SCULPT_TOOL_SNAKE_HOOK:
+      br->alpha = 1.0f;
+      break;
     case SCULPT_TOOL_THUMB:
       br->size = 75;
       br->flag &= ~BRUSH_ALPHA_PRESSURE;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 4bd2fe192f1..5a5d29806d7 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -6517,10 +6517,6 @@ bool sculpt_stroke_get_location(bContext *C, float out[3], const float mouse[2])
     }
   }
 
-  if (cache && hit) {
-    copy_v3_v3(cache->true_location, out);
-  }
-
   return hit;
 }



More information about the Bf-blender-cvs mailing list