From c4ce26c9061c2fcb231fe0570251c3b02d0caa5f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Apr 2012 08:33:30 +0000 Subject: Address [#30842] Blenders Measurement Units set to Metric, makes some Precision Flaws. use the same precision for location all over (2-5 was used), use define as 5. also disallow boolean to have any subtype besides PROP_LAYER_MEMBER, some booleans had TRANSLATION / XYZ subtypes which don't make sense. --- source/blender/makesrna/intern/rna_texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_texture.c') diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index be0058354d4..26dfe3c9a4f 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -471,6 +471,7 @@ static void rna_def_texmapping(BlenderRNA *brna) prop = RNA_def_property(srna, "translation", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_float_sdna(prop, NULL, "loc"); RNA_def_property_ui_text(prop, "Location", ""); + RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_update(prop, 0, "rna_Texture_mapping_update"); /* Not PROP_XYZ, this is now in radians, no more degrees */ @@ -610,7 +611,7 @@ static void rna_def_mtex(BlenderRNA *brna) /* mapping */ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_float_sdna(prop, NULL, "ofs"); - RNA_def_property_ui_range(prop, -10, 10, 10, 2); + RNA_def_property_ui_range(prop, -10, 10, 10, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_ui_text(prop, "Offset", "Fine tune of the texture mapping X, Y and Z locations"); RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); -- cgit v1.2.3