Home Technical Talk
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

Maya Python: Help with Querying.

polycounter lvl 14
Offline / Send Message
Fwap polycounter lvl 14
I've been looking into Python for maya of late and i'm getting the hang of it.
One concept i haven't wrapped my head around is the query flag and how i can use it.

More specifically i'm trying to query if a UV set exists and i'm assuming i can attempt to select the UV set i want using polyUVSet and query it, then use the query in an IF statement.

Or is my logic all wrong?

Replies

  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    A little backwards- You need to query if the UV set exists before you can do anything. So the query is what starts your If, running that if the result if the query is true. I haven't learned Python, but the idea is universal.

    -if this uv set exists, then select it and do stuff.
    -else, do other stuff.
Sign In or Register to comment.