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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2022-01-10 21:09:03 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2022-01-11 18:07:56 +0300
commit4cd7c8fc05d080588abf40ab3cdee68238e5fa27 (patch)
treec522d6357ab274988834374747d301e7204bdbb1 /rigify/rig_ui_template.py
parented42feaed565f5d21f10b05eee1f985a14f3cf11 (diff)
Rigify: refactor leg to make modifying the foot roll mechanism easier.
Diffstat (limited to 'rigify/rig_ui_template.py')
-rw-r--r--rigify/rig_ui_template.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index 06ff7faf..528a732c 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -130,6 +130,11 @@ def convert_pose_matrix_via_rest_delta(mat, from_bone, to_bone):
return mat @ from_bone.bone.matrix_local.inverted() @ to_bone.bone.matrix_local
+def convert_pose_matrix_via_pose_delta(mat, from_bone, to_bone):
+ """Convert pose of one bone to another bone, preserving the current pose difference between them."""
+ return mat @ from_bone.matrix.inverted() @ to_bone.matrix
+
+
def get_local_pose_matrix(pose_bone):
""" Returns the local transform matrix of the given pose bone.
"""