Home Technical Talk

Maya Python: Help with Querying.

polycounter lvl 13
Offline / Send Message
Fwap polycounter lvl 13
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
    Options
    Offline / Send Message
    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.