[Bf-blender-cvs] [a1c8595b090] blender2.8: Edit Curve: Add Normal size in overlay popover and change default range

Clément Foucault noreply at git.blender.org
Fri Dec 14 16:36:26 CET 2018


Commit: a1c8595b090254c1270bb66118304186a3add913
Author: Clément Foucault
Date:   Fri Dec 14 16:35:51 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBa1c8595b090254c1270bb66118304186a3add913

Edit Curve: Add Normal size in overlay popover and change default range

Change default range to 0..2 to improve the slider behavior.

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

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 470af8dc45f..ef2569672bf 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4870,7 +4870,12 @@ class VIEW3D_PT_overlay_edit_curve(Panel):
 
         row = col.row()
         row.prop(overlay, "show_curve_handles", text="Handles")
-        row.prop(overlay, "show_curve_normals", text="Normals")
+
+        row = col.row()
+        row.prop(overlay, "show_curve_normals", text="")
+        sub = row.row()
+        sub.active = overlay.show_curve_normals
+        sub.prop(overlay, "normals_length", text="Normals")
 
 
 class VIEW3D_PT_overlay_sculpt(Panel):
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 993b235128f..abbd65808cf 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2934,8 +2934,9 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
 	prop = RNA_def_property(srna, "normals_length", PROP_FLOAT, PROP_FACTOR);
 	RNA_def_property_float_sdna(prop, NULL, "overlay.normals_length");
 	RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view");
-	RNA_def_property_range(prop, 0.00001, 1000.0);
-	RNA_def_property_ui_range(prop, 0.01, 10.0, 10.0, 2);
+	RNA_def_property_range(prop, 0.00001, 100000.0);
+	RNA_def_property_ui_range(prop, 0.01, 2.0, 1, 2);
+	RNA_def_property_float_default(prop, 0.02);
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 
 	prop = RNA_def_property(srna, "backwire_opacity", PROP_FLOAT, PROP_FACTOR);



More information about the Bf-blender-cvs mailing list