Message 1 of 2
Getting mesh triangles in Python API?
Not applicable
12-10-2014
10:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to get mesh information to build a custom exporter. I found this link: Polygon_API_Handled_Internally and I've been able to retrieve the vertex indicies, and points using:
vertIndices = cmds.getAttr( mesh + ".vrts" , multiIndices=True )
verts = []
for i in vertIndices:
verts.append( cmds.xform( str( mesh ) + ".vtx[" + str( i ) + "]", query=True, translation=True, worldSpace=True ) )
Is there a way to retrieve all triangles for a mesh? Should I be using OpenMaya? I can't seem to find any clear documentation on how to do this.
Thanks,
RJ5