Set parenting with automatic weight causes my mesh to deform in the abdominal and pelvic area I am trying to set a mesh parenting with automatic weight to a skeleton I created. When I do so, I go from this:

to this:


How can I fix this?
After a quick search I solved it. I had to CTRL+A in Pose Mode and Apply Pose as Rest Pose before I set the automatic weight.