I'm trying to import a reference file, but my script is having trouble parsing the delimiter. This worked just fine in previous versions.
Jeff
2025-02-22 07:37:58 ImportReference: path = C:\Temp\xAngle\myriam\reference.csv, columns = nxyz, delimiter = ,, skip_rows = 2
2025-02-22 07:37:58 Finished processing in 0.002 sec (exit code 1)
# This python script will import a camera reference csv file into Metashape
# By Jeffrey Ian Wilson for the 3D Scanning Masterclass (www.jeffreyianwilson.com)
import Metashape,sys
doc = Metashape.app.document
chunk = doc.chunk
# Variables
referencePath = str(sys.argv[1]) # "C:\\Temp\\xAngle\\myriam\\reference.csv"
# Import Camera Reference
chunk.importReference(path = referencePath, format = Metashape.ReferenceFormatCSV, skip_rows=2, columns=" nxyz", delimiter=",")
for camera in chunk.cameras:
camera.reference.location_accuracy = Metashape.Vector([0.01,0.01,0.01])
camera.reference.rotation_accuracy = Metashape.Vector([0.1,0.1,0.1])
chunk.updateTransform()
UPDATE:
Stupid error on my part. the columns were wrong.