Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: howcanoewang on June 15, 2022, 03:28:33 PM

Title: Modify the capture distance in the chunk reference setting by python
Post by: howcanoewang on June 15, 2022, 03:28:33 PM
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?

(https://s2.loli.net/2022/06/15/7SMh3AHwaRjEO5c.png)

Thanks for your help.
Title: Re: Modify the capture distance in the chunk reference setting by python
Post by: Alexey Pasumansky 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)
Title: Re: Modify the capture distance in the chunk reference setting by python
Post by: howcanoewang on July 06, 2022, 05:26:42 AM
Dear Alexey,

Thank you for your reply, that works for me!

Sincerely,
Howcanoe