Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2021-06-15 13:51:19 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2021-06-18 18:56:04 +0300
commitb6030711a24f154de9c1c7287cf91d3cde3721c8 (patch)
treec40bde218083bb8134a50da182224487fdf4866b /release/scripts/startup/bl_ui/properties_data_bone.py
parent638c16f41010d716a3ee47017eb0155044dd825a (diff)
Armature: add automatic B-Bone Scale toggles.
Currently B-Bone scaling can only be controlled via their properties, thus requiring up to 8 drivers per joint between B-Bones to transfer scaling factors from the handle bone. A Scale Easing option is added to multiply the easing value by the Y scale channels to synchronize them - this produces a natural scaling effect where both the shape of the curve and the scale is affected. In addition, four toggles are added for each handle, which multiply each of the X, Y, Z and Ease values by the matching Local Scale channel of the handle bone, thus replacing trivial drivers. The Scale Easing option has no effect on this process since it's easy to just enable both Length and Ease buttons. Differential Revision: https://developer.blender.org/D9870
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_bone.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_bone.py39
1 files changed, 33 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py
index 7afc19f5e95..daf64642f68 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -176,20 +176,47 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
col = topcol.column(align=True)
col.prop(bbone, "bbone_easein", text="Ease In")
col.prop(bbone, "bbone_easeout", text="Out")
+ col.prop(bone, "use_scale_easing")
col = topcol.column(align=True)
col.prop(bone, "bbone_handle_type_start", text="Start Handle")
- col = col.column(align=True)
- col.active = (bone.bbone_handle_type_start != 'AUTO')
- col.prop_search(bone, "bbone_custom_handle_start", arm, bone_list, text="Custom")
+ col2 = col.column(align=True)
+ col2.active = (bone.bbone_handle_type_start != 'AUTO')
+ col2.prop_search(bone, "bbone_custom_handle_start", arm, bone_list, text="Custom")
+
+ row = col.row(align=True)
+ row.use_property_split = False
+ split = row.split(factor=0.4)
+ split.alignment = 'RIGHT'
+ split.label(text="Scale")
+ split2 = split.split(factor=0.7)
+ row2 = split2.row(align=True)
+ row2.prop(bone, "bbone_handle_use_scale_start", index=0, text="X", toggle=True)
+ row2.prop(bone, "bbone_handle_use_scale_start", index=1, text="Y", toggle=True)
+ row2.prop(bone, "bbone_handle_use_scale_start", index=2, text="Z", toggle=True)
+ split2.prop(bone, "bbone_handle_use_ease_start", text="Ease", toggle=True)
+ row.label(icon="BLANK1")
col = topcol.column(align=True)
col.prop(bone, "bbone_handle_type_end", text="End Handle")
- col = col.column(align=True)
- col.active = (bone.bbone_handle_type_end != 'AUTO')
- col.prop_search(bone, "bbone_custom_handle_end", arm, bone_list, text="Custom")
+ col2 = col.column(align=True)
+ col2.active = (bone.bbone_handle_type_end != 'AUTO')
+ col2.prop_search(bone, "bbone_custom_handle_end", arm, bone_list, text="Custom")
+
+ row = col.row(align=True)
+ row.use_property_split = False
+ split = row.split(factor=0.4)
+ split.alignment = 'RIGHT'
+ split.label(text="Scale")
+ split2 = split.split(factor=0.7)
+ row2 = split2.row(align=True)
+ row2.prop(bone, "bbone_handle_use_scale_end", index=0, text="X", toggle=True)
+ row2.prop(bone, "bbone_handle_use_scale_end", index=1, text="Y", toggle=True)
+ row2.prop(bone, "bbone_handle_use_scale_end", index=2, text="Z", toggle=True)
+ split2.prop(bone, "bbone_handle_use_ease_end", text="Ease", toggle=True)
+ row.label(icon="BLANK1")
class BONE_PT_relations(BoneButtonsPanel, Panel):