By the way, I tried this but it took away some photos that were properly aligned and left some that were not.
import Metashape, os
chunk = Metashape.app.document.chunk
print("start")
paths = set()
photos = list()
for camera in list(chunk.cameras):
if camera.photo.path in paths:
photos.append(camera)
else:
paths.add(camera.photo.path)
chunk.remove(photos)
print("finished. %d duplicates removed" % len(photos))
I believe what I actually need to do first is have the script delete all disabled cameras and then remove duplicates. Is there a way to sort for disabled cameras?
Thanks again,
Mark