From 2b2099cd519d2723dd79af2e1d9035c7cbb12022 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 8 Apr 2013 18:55:08 +0000 Subject: Fix #34875: 0 digits of precision was not supported for FloatProperty, now you can specify precision=0 for this, and use -1 for the default 2. --- source/blender/makesrna/intern/rna_curve.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/makesrna/intern/rna_curve.c') diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 479af956591..33bb20046e7 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -1303,7 +1303,7 @@ static void rna_def_curve(BlenderRNA *brna) prop = RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "bevresol"); RNA_def_property_range(prop, 0, 32); - RNA_def_property_ui_range(prop, 0, 32, 1.0, 0); + RNA_def_property_ui_range(prop, 0, 32, 1.0, -1); RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); @@ -1331,13 +1331,13 @@ static void rna_def_curve(BlenderRNA *brna) prop = RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolu"); RNA_def_property_range(prop, 1, SHRT_MAX); - RNA_def_property_ui_range(prop, 1, 64, 1, 0); + RNA_def_property_ui_range(prop, 1, 64, 1, -1); RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction"); RNA_def_property_update(prop, 0, "rna_Curve_resolution_u_update_data"); prop = RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolv"); - RNA_def_property_ui_range(prop, 1, 64, 1, 0); + RNA_def_property_ui_range(prop, 1, 64, 1, -1); RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction"); RNA_def_property_update(prop, 0, "rna_Curve_resolution_v_update_data"); @@ -1345,13 +1345,13 @@ static void rna_def_curve(BlenderRNA *brna) prop = RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolu_ren"); RNA_def_property_range(prop, 0, SHRT_MAX); - RNA_def_property_ui_range(prop, 0, 64, 1, 0); + RNA_def_property_ui_range(prop, 0, 64, 1, -1); RNA_def_property_ui_text(prop, "Render Resolution U", "Surface resolution in U direction used while rendering (zero skips this property)"); prop = RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolv_ren"); - RNA_def_property_ui_range(prop, 0, 64, 1, 0); + RNA_def_property_ui_range(prop, 0, 64, 1, -1); RNA_def_property_range(prop, 0, SHRT_MAX); RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering (zero skips this property)"); @@ -1569,14 +1569,14 @@ static void rna_def_curve_nurb(BlenderRNA *brna) prop = RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolu"); RNA_def_property_range(prop, 1, SHRT_MAX); - RNA_def_property_ui_range(prop, 1, 64, 1, 0); + RNA_def_property_ui_range(prop, 1, 64, 1, -1); RNA_def_property_ui_text(prop, "Resolution U", "Curve or Surface subdivisions per segment"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolv"); RNA_def_property_range(prop, 1, SHRT_MAX); - RNA_def_property_ui_range(prop, 1, 64, 1, 0); + RNA_def_property_ui_range(prop, 1, 64, 1, -1); RNA_def_property_ui_text(prop, "Resolution V", "Surface subdivisions per segment"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); -- cgit v1.2.3