When an IK constraint is applied to two bones, we call the bones the parent and child. IK rotates the parent and child so the tip of the child is at the target bone, or as close as possible. When you put non-uniform scale on the parent, the rotation of the child changes the length of the child. This is because the child inherits scale from the parent, so the direction the child is pointing changes the child's length. The IK solution you see is correct, even if it is not intuitive. If the parent and child pointed straight at the target, then the child would be shorter and therefore further from the target. You can remove the IK constraint and see this by rotating the bones manually.
I understand you don't like this behavior for your animation, but that is how IK works. Probably it is odd to scale an upper leg bone, since that means the lower leg bone will change length as the leg bends at the knee.
One solution could be to add a new bone. Maybe you can add a new bone that is the parent of the IK parent bone, then scale that bone instead of scaling the parent bone. Or add a new bone that is a child of the IK parent bone (ie a sibling of the IK child bone). Move your images to the new bone and scale that bone to change the image sizes. You could translate the child bone to be in the right place.
Another solution could be to set the IK mix to zero for this animation. The way you are using IK in that animation is to counteract the rotation of the hips, which could be done with rotate keys. Or, you could set a transform constraint, like in the attached project.
Here is the current IK solution:
Loading Image
Here is the same but without compensating for nonuniform scale on the parent IK bone:
Loading Image
As you can see, the IK is incorrect
the goal is for the tip of the child bone to be at the target.
Here's a pose from your actual animation:
Loading Image
Here is with nonuniform compensation off:
Loading Image
Admittedly it doesn't look much different, but zooming in you can see the tip is closer with the current solution:
Loading Image
Than with nonuniform compensation off:
Loading Image
Not a big deal you say? Only for your particular case, where the bones are straight. :wait: If not applying nonuniform compensation, IK breaks completely with nonuniform scale on the parent bone:
Loading Image
This is because when the bones bend, the child changes length. If it doesn't compensate for that, the IK solution is wrong (the child tip is not as close to the target as it could be). That we support nonuniform scale on the parent at all is the result of an extreme amount of effort and late nights with math books. :nerd: