Forum

Author Topic: Texture metadata access problem  (Read 4640 times)

Michel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Texture metadata access problem
« on: February 26, 2022, 05:10:37 PM »
Hello everyone,

I am programming a python script to export some metadata of a project in .txt format. After studying the python API, I managed to access the different metadata dictionaries of the Tie points cloud, dense cloud, model, etc. However, when I access the 3D model metadata, none of them refer to the BuildTexture function, only BuildModel and BuildUV. Furthermore, when I select my model, the GUI shows me the parameters used for the BuildTexture function. I conclude that the texture metadatas are present, but I can't access them.

How can I access these metadata?

I specify that I did create a texture for a 3D model and that the command Metashape.app.document.chunk.model.Texture.meta returns None. Furthermore, the Metashape.app.document.chunk.model.Texture command returns something so the texture is present.

Thanks a lot in advance,
Michel

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15710
    • View Profile
Re: Texture metadata access problem
« Reply #1 on: February 26, 2022, 06:23:49 PM »
Hello Michel,

Please check Metashape.app.document.chunk.model.textures[0].meta

Your call returns the Texture type (I mean Python type) - Metashape.app.document.chunk.model.Texture -> Metashape.Model.Texture type.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Michel

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Texture metadata access problem
« Reply #2 on: February 28, 2022, 11:13:52 AM »
Hello Alexey,

The Metashape.app.document.chunk.model.textures[0].meta command worked fine. I can now access the metadata of my texture.

Thanks a lot for your help