def create_ik_constraint(self, bone, ik_target, threshold=0.1):
        ik_target_name = ik_target.name
        print((ik_target.head - bone.tail).length)
        if (ik_target.head - bone.tail).length > threshold:
            with bpyutils.edit_object(self.__arm) as data:
                dummy_target = data.edit_bones.new(name=ik_target.name + '.ik_target_dummy')
                dummy_target.head = bone.tail
                dummy_target.tail = dummy_target.head + mathutils.Vector([0, 0, 1])
                dummy_target.layers = (
                    False, False, False, False, False, False, False, False,
                    True, False, False, False, False, False, False, False,
                    False, False, False, False, False, False, False, False,
                    False, False, False, False, False, False, False, False
                    )
                dummy_target.parent = data.edit_bones[ik_target.name]
                ik_target_name = dummy_target.name
            dummy_ik_target = self.__arm.pose.bones[ik_target_name]
            dummy_ik_target.is_mmd_shadow_bone = True
            dummy_ik_target.mmd_shadow_bone_type = 'IK_TARGET'

        ik_const = bone.constraints.new('IK')
        ik_const.target = self.__arm
        ik_const.subtarget = ik_target_name
        return ik_const
Update the users's status
dataset/ETHPy150Open sugiany/blender_mmd_tools/mmd_tools/core/model.py/Model.create_ik_constraint--crossover with--dataset/ETHPy150Open rllynch/pi_garage_alert/bin/pi_garage_alert.py/Twitter.update_status