Forum

Author Topic: Add tweaks to script in Metashape  (Read 1642 times)

ehxz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Add tweaks to script in Metashape
« on: November 06, 2022, 12:35:41 AM »
Hello ;D

I want to add the following tweaks to a script:

BuildModel/ooc_surface_blow_up = 0.95
BuildModel/ooc_surface_blow_off = 0.95

Is it possible to add these tweaks and how?

chunk.buildModel(...)

Thanks in advance for your help!

e.spiridonova

  • Agisoft Technical Support
  • Newbie
  • *****
  • Posts: 29
    • View Profile
Re: Add tweaks to script in Metashape
« Reply #1 on: November 07, 2022, 11:52:15 AM »
Hello,

We can offer the following solutions:
1. Use the following command:
Code: [Select]
Metashape.app.settings.setValue("BuildModel/ooc_surface_blow_up",0.95)
Metashape.app.settings.setValue("BuildModel/ooc_surface_blow_off",0.95)
‚Äč
2. Or try using tasks, as an example below:
Code: [Select]
chunk = Metashape.app.document.chunk
task = Metashape.Tasks.BuildModel()
task["ooc_surface_blow_up"] = "0.95"
task["ooc_surface_blow_off"] = "0.95"
[i]#add other paramerters for building model[/i]
task.apply(chunk)
Best regards,
Elizaveta Spiridonova,
Agisoft LLC

e.spiridonova

  • Agisoft Technical Support
  • Newbie
  • *****
  • Posts: 29
    • View Profile
Re: Add tweaks to script in Metashape
« Reply #2 on: November 07, 2022, 12:25:42 PM »
Dear ehxz,
Please note, that the 1st solution this is an analogue of setting tweaks through the interface.
The second solution (using tasks) is suitable for using tweaks during the script.
Best regards,
Elizaveta Spiridonova,
Agisoft LLC

ehxz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Add tweaks to script in Metashape
« Reply #3 on: November 08, 2022, 01:37:06 PM »
Dear spiridonova,

Thank you very much! I was able to make it work with this.

Have a great week!