[Bf-blender-cvs] [ea4cc817d11] greasepencil-object: GPencil: Modifier: Simplify: Fix modifier distance and length property feel

Clément Foucault noreply at git.blender.org
Fri Mar 6 01:38:31 CET 2020


Commit: ea4cc817d119cc15726855e9b140329f789ca146
Author: Clément Foucault
Date:   Fri Mar 6 01:33:44 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rBea4cc817d119cc15726855e9b140329f789ca146

GPencil: Modifier: Simplify: Fix modifier distance and length property feel

This reduce the rate of increase and unlock the range of the props.

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

M	source/blender/makesrna/intern/rna_gpencil_modifier.c

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

diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index a4189110732..499901acb7b 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -773,16 +773,18 @@ static void rna_def_modifier_gpencilsimplify(BlenderRNA *brna)
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
   /* Sample */
-  prop = RNA_def_property(srna, "length", PROP_FLOAT, PROP_NONE);
+  prop = RNA_def_property(srna, "length", PROP_FLOAT, PROP_DISTANCE);
   RNA_def_property_float_sdna(prop, NULL, "length");
-  RNA_def_property_range(prop, 0, 10.0f);
+  RNA_def_property_range(prop, 0, FLT_MAX);
+  RNA_def_property_ui_range(prop, 0, 1.0, 0.01, 3);
   RNA_def_property_ui_text(prop, "Length", "Length of each segment");
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
-  /* Distance */
-  prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+  /* Merge */
+  prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
   RNA_def_property_float_sdna(prop, NULL, "distance");
-  RNA_def_property_range(prop, 0, 100.0f);
+  RNA_def_property_range(prop, 0, FLT_MAX);
+  RNA_def_property_ui_range(prop, 0, 1.0, 0.01, 3);
   RNA_def_property_ui_text(prop, "Distance", "Distance between points");
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 }



More information about the Bf-blender-cvs mailing list