How frame location is calculated?

Hi! I have question about frame location. How it is calculated? In the picture principledBsdf node and frame node are set to (0,0) location. But as you can see the are not align to each other. Should all nodes be aligned using left-top corner. But frame element dosen’t follow this rule.

I have hard time to find out where is frame elements (0,0)

Or better question is this. If I have frame and there is one node inside it. What python commands do I need to write to set frame top-left corner into (0,0) in shader editor?

It appears that new frames behave like other nodes, i.e. the top left corner is the origin.
But if you change the size of the frame the origin stays at the same location while the frames borders are transformed somewhere else.
This is probably intended because it would cause problems if changing the size of the frames changed its location.

It is possible to grab the dimensions but I don’t know if you can get the locations of the borders somehow.

But right now changing the size of the frame changes the location too.

Hmm… indeed. If you change the width in Python the location is not changed. Weird.
I’d try asking this on the developer forum.

Thanks a lot.

Hey, any news about this ?
I have the same issue T_T

This is really odd. If frame is empty, location of frame is easy to understand, but if you bring other nodes into frame, then I haven’t found any way to calculate frame’s world position.