diff options
author | Scott Wilson <propersquid> | 2021-03-30 12:16:45 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-03-30 12:40:26 +0300 |
commit | 74d5a93b2bf7806993d9baa24fd35228e52c4970 (patch) | |
tree | ffc33f5033d99abcb5c50d7ea20ec992a7393b16 /source/blender/makesrna | |
parent | 0d65d27386d649b42599952fed1532892ee03a35 (diff) |
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
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_armature.c | 10 |
1 files changed, 10 insertions, 0 deletions
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"); |