Commit: 8556e801a7b29e6c1989db6acf216a861c467273
Author: Richard Antalik
Date:   Mon Aug 17 20:49:38 2020 +0200
Branches: master
https://developer.blender.org/rB8556e801a7b29e6c1989db6acf216a861c467273

Fix T79594: Define rounding for armature edit props

Define `RNA_def_property_ui_range` for head and tail transform properties.
Step of 10 should match original behavior when tweaking value.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D8513

===================================================================

M       source/blender/makesrna/intern/rna_armature.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_armature.c 
b/source/blender/makesrna/intern/rna_armature.c
index 8454d5c125f..155943b3b8d 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -1264,6 +1264,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
   RNA_def_property_float_sdna(prop, NULL, "head");
+  RNA_def_property_ui_range(prop, 0, FLT_MAX, 10, 
RNA_TRANSLATION_PREC_DEFAULT);
   RNA_def_property_array(prop, 3);
   RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone");
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -1271,6 +1272,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
   RNA_def_property_float_sdna(prop, NULL, "tail");
+  RNA_def_property_ui_range(prop, 0, FLT_MAX, 10, 
RNA_TRANSLATION_PREC_DEFAULT);
   RNA_def_property_array(prop, 3);
   RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone");
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to