Hello guys, i used a code to translate and transform my coordinate system to the first camera of my chunk, and the code was..
import Metashape
def CS_to_camera():
print("Script started...")
chunk = Metashape.app.document.chunk
if not chunk:
print("Empty project, script aborted")
return
selected = [camera for camera in chunk.cameras if camera.selected and camera.transform]
if len(selected) != 1:
print("Select only one aligned camera to procees. Script aborted.")
return
camera = selected[0]
Rt = camera.transform
chunk.transform.translation = Metashape.Vector((0,0,0))
chunk.transform.matrix = chunk.transform.matrix * Rt.inv()
print("System set to " + camera.label + " coordinates. Script finished.")
return 1
CS_to_camera()
Metashape.app.addMenuItem("Custom menu/Coordinate system to camera", CS_to_camera)
With this code, when i export the cameras its positions and rotations should be value "0" for X, Y, Z and Ome, Phi and Kappa.
But i had X =0, Y = 0, Z = 0, Omega = - 180, Phi = 0 and Kappa = 0.
I don't have any idea what is causing this Omega value.
Someone has any idea how to turn this value to "0"??