Mannequin animation suddenly broken

I just exported the fbx of the mannequin from the TopDownExample project.
Then I created a copy of it and deleted all parts except the hip and legs and the skeleton and scaled the legs a bit larger to make “pants” because I wanted to try attaching pants to the character in the game.
Then I imported those “pants” to UE but the animations were totally weird even though it has the same skeleton as the mannequin.
I checked the skeleton tab and everything seems to be correct.
Then I saw it… It was not the skeleton of the pants that was broken. It was the animations. The animations of the mannequin’s skeleton that the pants share.

So somehow importing the mesh that uses the mannequins skeleton screwed up the animations.
How and why did that happen? What did I do wrong? Is there any way to undo that or is my only option to create a new TopDownExample project and export the animations?

I always get this error message.
4e24f10d6c.png

It doesn’t seem like it has anything to do with me editing the mesh.
I just exported the SK_Mannequin, imported it in 3DS Max and exported it again. When I import it in Unreal I get that error again, even though I haven’t changed anything.
Something about the export/import process seems to be damaging something but what is it?

Edit: Same thing happens when I use Maya instead of 3DS Max

Edit2:
I have figured out the problem and a solution.
It’s so stupid. Since the file contains both the mesh and the skeleton either 3ds Max creates a parent object to contain both when importing or UE4 does this when exporting the fbx.
I didn’t notice this and then in UE4 that parent object is above the root bone which completely destroys the hierarchy.
4e24f10d6c.png

If you have that problem too simply delete that parent object and the hierarchy should be in order again.
38b6bea13e.png