Forum

Author Topic: How to select disable cameras.  (Read 4088 times)

8ashe

  • Newbie
  • *
  • Posts: 8
    • View Profile
How to select disable cameras.
« on: April 30, 2019, 03:58:03 AM »
Hello, there:

How can I select all disable cameras and remove them?
I think there should be some field like status(enable/disable/flagged/etc.) but I can't find.

Paulo

  • Hero Member
  • *****
  • Posts: 1320
    • View Profile
Re: How to select disable cameras.
« Reply #1 on: April 30, 2019, 09:10:23 AM »
Hi 8ashe,

to create a list of all disabled cameras in chunk and remove them, use following code:
Code: [Select]
chunk = Metashape.app.document.chunk

cameras_disabled = [camera for camera in chunk.cameras
                            if camera.enabled == False]

chunk.remove(cameras_disabled)

Hope this can help you,
« Last Edit: April 30, 2019, 09:12:08 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

andrewgupta

  • Guest
Re: How to select disable cameras.
« Reply #2 on: May 10, 2019, 12:22:33 PM »
It worked! Had same question

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • Sketchfab Models
Re: How to select disable cameras.
« Reply #3 on: July 03, 2021, 07:37:26 PM »
How can we delete disabled photos in Metashape Standard?  We can't run scripts.

I've noticed that deleting disabled photos also reduces the tie points, and speeds up processing.  So when i run Reduce Overlap, which disables 1/3 of my photos, i definitely want to delete them all, as it'll save me hours of processing!