From 74d5a93b2bf7806993d9baa24fd35228e52c4970 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Tue, 30 Mar 2021 11:16:45 +0200 Subject: Armature: Add Display Axis Offset Display the bone axes at the head (root) of the bone by default, instead of the tail (tip), and add a slider so that it's possible to adjust this position. Versioning code is in place to ensure existing files behave the same (axes shown at tail), whereas new Armatures will be using the new default (axes shown at head). Reviewed By: #animation_rigging, #user_interface, Severin, Sybren Differential Revision: https://developer.blender.org/D7685 --- source/blender/makesrna/intern/rna_armature.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 554f04ca23c..c54621372ba 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -1537,6 +1537,16 @@ static void rna_def_armature(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); + prop = RNA_def_property(srna, "axes_position", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "axes_position"); + RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 1); + RNA_def_property_ui_text(prop, + "Axes Position", + "The position for the axes on the bone. Increasing the value moves it " + "closer to the tip; decreasing moves it closer to the root"); + RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); + prop = RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DRAWNAMES); RNA_def_property_ui_text(prop, "Display Names", "Display bone names"); -- cgit v1.2.3