[Bf-blender-cvs] [35ac8cf4dca] sculpt-dev: Sculpt Expand: Fix gradient when using invert

Pablo Dobarro noreply at git.blender.org
Sun Feb 7 18:02:41 CET 2021


Commit: 35ac8cf4dca38df8add9e79ceaf45246622e6162
Author: Pablo Dobarro
Date:   Sun Feb 7 17:59:15 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB35ac8cf4dca38df8add9e79ceaf45246622e6162

Sculpt Expand: Fix gradient when using invert

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

M	source/blender/editors/sculpt_paint/sculpt_expand.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index 2da3a2567e8..b5ea9b676f4 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -184,8 +184,9 @@ static float sculpt_expand_gradient_falloff_get(ExpandCache *expand_cache, const
   if (expand_cache->invert) {
     linear_falloff = (falloff_factor - active_factor) / (loop_len - active_factor);
   }
-
-  linear_falloff = 1.0f - (falloff_factor / active_factor);
+  else {
+    linear_falloff = 1.0f - (falloff_factor / active_factor);
+  }
 
   if (!expand_cache->brush_gradient) {
     return linear_falloff;



More information about the Bf-blender-cvs mailing list