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>2019-10-03 17:28:09 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-10-03 17:57:27 +0300
commit67f9b94291cc60bad9664432ef4f5f632fe54eb3 (patch)
treebc3e5cc3d87505af2a3b2988f8c93fbaaca55434
parent8c991bf63a88488a7494367744834325d90db4b7 (diff)
Fix sculpt normal update in SculptDraw brush
Reviewed By: brecht Differential Revision: https://developer.blender.org/D5981
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c6
1 files changed, 4 insertions, 2 deletions
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);