Maya API 2.0 get vertices/faces faster than converting selection?

Maya API 2.0 get vertices/faces faster than converting selection?

j.victor.ferreira
Enthusiast Enthusiast
662 Views
3 Replies
Message 1 of 4

Maya API 2.0 get vertices/faces faster than converting selection?

j.victor.ferreira
Enthusiast
Enthusiast

Hey guys!

Could somebody help me?

There is a way to get vertices of a face in API, faster than converting selection with polyListComponentConversion?

Thanks a lot!

0 Likes
Accepted solutions (1)
663 Views
3 Replies
Replies (3)
Message 2 of 4

negow
Advocate
Advocate

If you're going to shotgun your question across the interwebs, at least be kind enough to link to your other posts.

 

- https://groups.google.com/g/python_inside_maya/c/LPZoRNRQQMI

0 Likes
Message 3 of 4

j.victor.ferreira
Enthusiast
Enthusiast

hey marcus!

nice to see u here in autodesk forum. 🙂

and thanks again for trying to help me in google chat!

 

Lemme help you to feel better!

Sharing the same question in more than one forum in the web is not a wrong thing to do, and it doesn´t looks like "shotgun in interwebs". (it sounds too much dramatic, sorry)

The most artists are not on the same platforms, and posting on more than one, creates more interaction, so more different solutions.

Thanks for the idea to post the another platform link, but I would say that writing a reply like yours, is definitely not kind enough.

 

Hope it help u for your next reply, buddy! 😄

0 Likes
Message 4 of 4

j.victor.ferreira
Enthusiast
Enthusiast
Accepted solution

Hey! problem solved:

 

 

def buildFaceVertList(fnMesh):
    cursor, out = 0, []
    counts, idxs = fnMesh.getVertices()
    for i, count in enumerate(counts):
        out.append(idxs[cursor: cursor + count])
        cursor += count
    return out

 

hey buddy @negow please let me know if you are still trying to understand the question!

cheers!

0 Likes