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

Change default range to 0..2 to improve the slider behavior.
This commit is contained in:
Clément Foucault 2018-12-14 16:35:51 +01:00
parent f371e633f9
commit a1c8595b09
2 changed files with 9 additions and 3 deletions

View File

@ -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):

View File

@ -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);