Show dimensions of planar surface tool box?

Is there a way of getting the dimensions of the planar surface once you finish adjusting its corners? This would be useful for creating insert images so the match the aspect ratio easily. Also is there a way of aligning the corners of the planar surface box so they form perfect 90 degree corners rather than eyeballing where to position the corners manually?

If you right-click the surface you can make it fit the ratio of the insert pixels. Mocha will try to adjust the ratio according to the distortion already applied, but won’t always get it 100% right because it has to estimate how the ratio would scale in perspective.

You can’t “square” the corners in distorted space, but you can reset the corners back to 90 degrees screen space using the reset option in the right-click menu as well. This just resets the surface back inside the bounds of the layer.

If you use Python, you can get the exact x, y pixel position of each of the corners, but we don’t have an interface method for this:

def get_surface_parameters(layer, time=0, view=View(0)):
    surface_corners = []
    
    for idx in range(0, 4):
        surface_corners.extend(layer.get_surface_position(idx, time, view))
    return surface_corners

proj = get_current_project()

selected_layer = [layer for layer in proj.layers if layer.selected]

if selected_layer != []:
    corners = get_surface_parameters(selected_layer[0])
    print(corners)

Thanks Martin, good tip.