Thank you very much, that was really detailed, your answer solved the problem
i learned a from your information, i’m always looking for the best practices in any topic that i’m learning/researching, i’m gonna replicate all the changes into my main model.
just for the record (because it could help other people)
when i was trying to solve the ik twist problem i found a python script that automatically calculates the correct ik pole rotation and it output it’s value to the console, here is the link https://blender.stackexchange.com/questions/19754/how-to-set-calculate-pole-angle-of-ik-constraint-so-the-chain-does-not-move/19755#19755
and the code, just for quick reference
import bpy
from mathutils import *
def signed_angle(vector_u, vector_v, normal):
# Normal specifies orientation
angle = vector_u.angle(vector_v)
if vector_u.cross(vector_v).angle(normal) < 1:
angle = -angle
return angle
def get_pole_angle(base_bone, ik_bone, pole_location):
pole_normal = (ik_bone.tail - base_bone.head).cross(pole_location - base_bone.head)
projected_pole_axis = pole_normal.cross(base_bone.tail - base_bone.head)
return signed_angle(base_bone.x_axis, projected_pole_axis, base_bone.tail - base_bone.head)
base_bone = bpy.context.active_object.pose.bones["BASE_BONE_NAME"]
ik_bone = bpy.context.active_object.pose.bones["IK_BONE_NAME"]
pole_bone = bpy.context.active_object.pose.bones["POLE_BONE_NAME"]
pole_angle_in_radians = get_pole_angle(base_bone,
ik_bone,
pole_bone.matrix.translation)
pole_angle_in_deg = round(180*pole_angle_in_radians/3.141592, 3)
print(pole_angle_in_deg)
where:
BASE_BONE_NAME = ik target
IK_BONE_NAME = bone with the ik constraint
POLE_BONE_NAME = pole bone (knee in this case)
also, i found an addon version of the same code :
link = https://blender.stackexchange.com/a/79087
so i mixed both ‘solutions’ keeping the pole angle calculated by the addon, and all the setup from DanPro answer and it give me the desired result.
Thank you very much for your time, and btw, i saw your video tutorials before, so it was a nice surprise to see that a person that i follow on youtube answered my question.