Forum

Author Topic: Tasks.ExportModel and Chunk.Model.exportModel inconsistent  (Read 5351 times)

wojtek

  • Sr. Member
  • ****
  • Posts: 284
    • View Profile
Tasks.ExportModel and Chunk.Model.exportModel inconsistent
« on: April 11, 2019, 02:49:33 PM »
I consider this a bug so I did not post this in Python section.

Argument names are inconsistent (export_normals vs normals for example)

Also Model.exportModel is missing the export_uv option.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15159
    • View Profile
Re: Tasks.ExportModel and Chunk.Model.exportModel inconsistent
« Reply #1 on: April 15, 2019, 07:24:35 PM »
Hello wojtek,

The inconsistency is related to later introduction of Metashape.Tasks class than common methods. Tasks class is more close to the internal representation of the processing features and therefore is also similar to NetworkTasks implementation, having similar naming convention for the parameters/arguments used.

We'll see, if we could bring everything to the same convention, but as it appears to be a major change, I think it could be expected in the version 1.6, otherwise the scripts compatibility within versions 1.5.x could be broken.
Best regards,
Alexey Pasumansky,
Agisoft LLC

wojtek

  • Sr. Member
  • ****
  • Posts: 284
    • View Profile
Re: Tasks.ExportModel and Chunk.Model.exportModel inconsistent
« Reply #2 on: April 21, 2019, 02:56:11 PM »
Hello wojtek,

The inconsistency is related to later introduction of Metashape.Tasks class than common methods. Tasks class is more close to the internal representation of the processing features and therefore is also similar to NetworkTasks implementation, having similar naming convention for the parameters/arguments used.

We'll see, if we could bring everything to the same convention, but as it appears to be a major change, I think it could be expected in the version 1.6, otherwise the scripts compatibility within versions 1.5.x could be broken.


Understood, I think for the next 1.5.x release adding just the missing UV option would be beneficial.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15159
    • View Profile
Re: Tasks.ExportModel and Chunk.Model.exportModel inconsistent
« Reply #3 on: April 22, 2019, 05:07:59 PM »
Hello wojtek,

Have you checked, if using exportModel(..., texture = True, texture_format=Metashape.ImageFormatNone) gives you a desired result and saves the model with UV mapping, but without the texture image.
Best regards,
Alexey Pasumansky,
Agisoft LLC

wojtek

  • Sr. Member
  • ****
  • Posts: 284
    • View Profile
Re: Tasks.ExportModel and Chunk.Model.exportModel inconsistent
« Reply #4 on: April 26, 2019, 01:24:54 PM »
Hello wojtek,

Have you checked, if using exportModel(..., texture = True, texture_format=Metashape.ImageFormatNone) gives you a desired result and saves the model with UV mapping, but without the texture image.

I ended up using Tasks.ExportModel instead but it's good to know its possible with chunk.exportModel albeit not very intuitive (setting texture= True ignores uvs if texture map is not present, i didn't think of setting imageformat to None).

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15159
    • View Profile
Re: Tasks.ExportModel and Chunk.Model.exportModel inconsistent
« Reply #5 on: August 16, 2019, 02:21:11 PM »
In the version 1.6 we are planning to update API and unify the parameter names for functions and Tasks.
Best regards,
Alexey Pasumansky,
Agisoft LLC