[Bf-blender-cvs] [636751bb360] master: GPencil: Clarify Target weight tooltip and remove lower limit

Antonio Vazquez noreply at git.blender.org
Tue Jun 4 17:43:13 CEST 2019


Commit: 636751bb36097e57c191652575ed6394b6dae105
Author: Antonio Vazquez
Date:   Tue Jun 4 17:42:39 2019 +0200
Branches: master
https://developer.blender.org/rB636751bb36097e57c191652575ed6394b6dae105

GPencil: Clarify Target weight tooltip and remove lower limit

The target value was affecting the lower value and this was weird. Now the value is clamped between 0 and target weight.

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

M	source/blender/editors/gpencil/gpencil_brush.c
M	source/blender/makesrna/intern/rna_sculpt_paint.c

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

diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 7e871e03b99..3274f9657db 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -922,13 +922,7 @@ static bool gp_brush_weight_apply(
   float curweight = dw ? dw->weight : 0.0f;
 
   if (gp_brush_invert_check(gso)) {
-    /* reduce weight (verify mainimum target) */
-    if (curweight - inf < gso->gp_brush->weight) {
-      curweight = gso->gp_brush->weight;
-    }
-    else {
-      curweight -= inf;
-    }
+    curweight -= inf;
   }
   else {
     /* increase weight */
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 3f72644448b..221d4375970 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -1548,7 +1548,10 @@ static void rna_def_gpencil_sculpt(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
   RNA_def_property_range(prop, 0.0, 1.0);
-  RNA_def_property_ui_text(prop, "Weight", "Target weight");
+  RNA_def_property_ui_text(prop,
+                           "Weight",
+                           "Target weight (define a maximum range limit for the weight. Any value "
+                           "above will be clamped)");
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
   RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);



More information about the Bf-blender-cvs mailing list