From 636751bb36097e57c191652575ed6394b6dae105 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Tue, 4 Jun 2019 17:42:39 +0200 Subject: [PATCH] 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. --- source/blender/editors/gpencil/gpencil_brush.c | 8 +------- source/blender/makesrna/intern/rna_sculpt_paint.c | 5 ++++- 2 files changed, 5 insertions(+), 8 deletions(-) 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);