Forum

Author Topic: Disable Photos With "DJI" Header  (Read 1305 times)

Dragline

  • Newbie
  • *
  • Posts: 34
    • View Profile
Disable Photos With "DJI" Header
« on: May 30, 2019, 06:02:31 PM »
This is a super simple one:

I'm looking for a script that will disable all photos that have DJI in their filename. Can anyone help with that?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Disable Photos With "DJI" Header
« Reply #1 on: May 30, 2019, 07:04:52 PM »
Hello Dragline,

You can try the following:

Code: [Select]
import Metashape, os
for camera in Metashape.app.document.chunk.cameras:
    if "DJI" in os.path.basename(camera.photo.path):
         camera.enabled = False
Best regards,
Alexey Pasumansky,
Agisoft LLC