Forum

Author Topic: Modify the capture distance in the chunk reference setting by python  (Read 1201 times)

howcanoewang

  • Newbie
  • *
  • Posts: 6
    • View Profile
Hello, I am writing scripts for batch processing, but hard to find the API to modify this value. Any ideas to implement this without manually changing chunks one by one?



Thanks for your help.
« Last Edit: June 19, 2022, 10:04:45 AM by howcanoewang »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14487
    • View Profile
Re: Modify the capture distance in the chunk reference setting by python
« Reply #1 on: June 22, 2022, 07:27:15 PM »
Hello howcanoewang,

You can set this value as following:

Code: [Select]
chunk = Metashape.app.document.chunk
capture_distance = 10.5
chunk.meta['subject_distance'] = str(capture_distance)
Best regards,
Alexey Pasumansky,
Agisoft LLC

howcanoewang

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Modify the capture distance in the chunk reference setting by python
« Reply #2 on: July 06, 2022, 05:26:42 AM »
Dear Alexey,

Thank you for your reply, that works for me!

Sincerely,
Howcanoe