Fix #127745: Increase "angle_limit" display precision

The property "angle_limit" in bevel and decimate modifier only has a
display precision of 2, but the steps are in 0.1 for each click, so
clicking does not necessarily cause the display number to update. Set
precision to 4 to allow fractions to be displayed properly.
This commit is contained in:
YimingWu
2024-09-20 11:46:10 +08:00
parent 8485aaf105
commit 800d543fa5

View File

@@ -3063,7 +3063,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, nullptr, "angle");
RNA_def_property_range(prop, 0, DEG2RAD(180));
RNA_def_property_ui_range(prop, 0, DEG2RAD(180), 10, 2);
RNA_def_property_ui_range(prop, 0, DEG2RAD(180), 10, 4);
RNA_def_property_ui_text(prop, "Angle Limit", "Only dissolve angles below this (planar only)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -4943,7 +4943,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, nullptr, "bevel_angle");
RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 2);
RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 4);
RNA_def_property_ui_text(prop, "Angle", "Angle above which to bevel edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");