I'm trying to understand how Blender applies parent-child relationship w.r.t rotation. My end goal is to get the child rotation relative to the world. While there might be a function for that, I'd still want to understand how things work.
To make things simple, I'll use the X/Z ortho view, and only rotate on Y. Here's my basic setup:
The object at the center (called 'Bottom' has a Y rotation of 135°). The other object ('Top') has a Y rotation of 45°:
Now I make 'Bottom' the parent of 'Top', and 'Top' still has a 45° rotation:
Finally, I rotate 'Bottom' by 45° and get the following result:
Now, Bottom's rotation is 180° (not shown in the screenshot), which seems reasonable, and Top's rotation is still 45°.
While it's obvious Top's rotation shouldn't change if I rotate Bottom, it's not obvious what's Top's rotation is relative to. Clearly, its parent is vertical and it is horizontal, so where did that 45° come from?
When Top became a child of Bottom, its rotation became (in practice) relative to Bottom's, why didn't the numbers change? How is the global/world rotation is calculated based on the parent and child rotations?