Forum

Author Topic: check if model has UVs  (Read 3632 times)

jrjdavidson

  • Newbie
  • *
  • Posts: 23
    • View Profile
check if model has UVs
« on: February 06, 2024, 10:36:18 PM »
Kia ora,

I've had a read through the reference and read through this forum, but for the life of me I can't find how to check if a model already has UVs built. if anyone can providem e with the command, I'd appreciate it! e.g an equivalent check for if a model exists:
Code: [Select]
if not chunk.model:

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15471
    • View Profile
Re: check if model has UVs
« Reply #1 on: February 07, 2024, 03:57:42 PM »
Hello jrjdavidson,

You can check, if model.tex_vertices exist and if it not an empty arrary:
Code: [Select]
if len(chunk.model.tex_vertices):
    print("Model has UVs")
Best regards,
Alexey Pasumansky,
Agisoft LLC

jrjdavidson

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: check if model has UVs
« Reply #2 on: February 07, 2024, 10:19:29 PM »
thanks!