UI: use non-linear sliders

* Boolean Modifier > Fast > Overlap Threshold (Logarithmic).
* Remesh Modifier > Voxel > Voxel Size (Logarithmic).
* Sculpt > Dyntopo > Detail Size (Cubic).

Ref D9074
This commit is contained in:
Henrik Dick 2021-05-17 17:33:00 +10:00 committed by Campbell Barton
parent 0447aedb96
commit e95f71bf15
Notes: blender-bot 2023-04-17 07:51:53 +02:00
Referenced by issue #90272, Voxel Remesh Modifier - No Minimum Cap on Voxel Size?  Crash on 0 value.
Referenced by issue #88634, No guard against voxel size of 0.
Referenced by issue #107011, Regression: Boolean Modifier Overlap Threshold property issue in UI when value is 0
2 changed files with 5 additions and 2 deletions

View File

@ -2781,7 +2781,8 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
prop = RNA_def_property(srna, "double_threshold", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "double_threshold");
RNA_def_property_range(prop, 0, 1.0f);
RNA_def_property_ui_range(prop, 0, 1, 0.0001, 6);
RNA_def_property_ui_range(prop, 0, 1, 1.0, 6);
RNA_def_property_ui_scale_type(prop, PROP_SCALE_LOG);
RNA_def_property_ui_text(
prop, "Overlap Threshold", "Threshold for checking overlapping geometry");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@ -5530,6 +5531,7 @@ static void rna_def_modifier_remesh(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "voxel_size");
RNA_def_property_range(prop, 0.0001f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 0.1, 3);
RNA_def_property_ui_scale_type(prop, PROP_SCALE_LOG);
RNA_def_property_ui_text(prop,
"Voxel Size",
"Size of the voxel in object space used for volume evaluation. Lower "

View File

@ -786,7 +786,8 @@ static void rna_def_sculpt(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_ShowMask_update");
prop = RNA_def_property(srna, "detail_size", PROP_FLOAT, PROP_PIXEL);
RNA_def_property_ui_range(prop, 0.5, 40.0, 10, 2);
RNA_def_property_ui_range(prop, 0.5, 40.0, 0.1, 2);
RNA_def_property_ui_scale_type(prop, PROP_SCALE_CUBIC);
RNA_def_property_ui_text(
prop, "Detail Size", "Maximum edge length for dynamic topology sculpting (in pixels)");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);