Okay this is a strange request I would guess. But basically when working with cyclic dependencies, if you re-select the IK Solver on the list it reverses the order of the cyclic dependency.
Simply clicking the dropdown and selecting ‘Standard’ again achieves this.
So what I’m wondering is if it’s possible to create a hotkey to do this?
bpy.context.object.pose.ik_solver=‘LEGACY’
I’ve played around with the ‘Pose.ik_solver’ in the hotkey list, and nothing works so I’m starting to think that’s not how you do it. I don’t know python at all (as you might have figured) and I want to bind that command to the tilde button. So any help would be appreciated.
Cheers
edit: I figured it out nevermind!
import bpy
def main(context):
bpy.context.object.pose.ik_solver='LEGACY'
class SimpleOperator(bpy.types.Operator):
"""Tooltip"""
bl_idname = "object.ik_reset"
bl_label = "IK Reset"
@classmethod
def poll(cls, context):
return context.active_object is not None
def execute(self, context):
main(context)
return {'FINISHED'}
def register():
bpy.utils.register_class(SimpleOperator)
def unregister():
bpy.utils.unregister_class(SimpleOperator)
if __name__ == "__main__":
register()
# test call
bpy.ops.object.ik_reset()