diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-14 18:35:51 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-12-14 18:35:51 +0300 |
commit | a1c8595b090254c1270bb66118304186a3add913 (patch) | |
tree | 5cb66e0c07b1f79d4dbb68f9fe8c13fa9848caa8 | |
parent | f371e633f9428e767dce4aab59b5f30c78f2b66f (diff) |
Edit Curve: Add Normal size in overlay popover and change default range
Change default range to 0..2 to improve the slider behavior.
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 5 |
2 files changed, 9 insertions, 3 deletions
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); |