Forum

Author Topic: Remove empty chunks  (Read 6748 times)

r0xx

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Remove empty chunks
« on: May 20, 2015, 05:05:23 PM »
Hello

How can I automatically remove empty chunks (Without any cameras inside) from the document?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15635
    • View Profile
Re: Remove empty chunks
« Reply #1 on: May 20, 2015, 05:09:08 PM »
Hello r0xx,

Code: [Select]
for chunk in list(doc.chunks):
      if not len(chunk.cameras):
            doc.remove(chunk)
Best regards,
Alexey Pasumansky,
Agisoft LLC

r0xx

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Remove empty chunks
« Reply #2 on: May 20, 2015, 05:42:22 PM »
Thanks alot!