Avoid MfnMesh.create removing (degenerate) triangles?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm working on writing a mesh (our proprietary format) back to Maya and it is very important that the result is identical to the input I gave MfnMesh.create, which in my case it is not. I know that my input does not fulfill all Maya's conditions of being a valid mesh, several triangles have zero area and some are identical.
This is from the Maya documentation:
"
- If the vertex connection list for a polygon specifies an edge with the same start and end vertices, those edges will be removed. (ie. a polygon specified as 1 2 2 3 4 will be transformed into 1 2 3 4).
- If the same vertex appears in the vertex connection list for a polygon more than once, another vertex will be created at the same location, and the list will be altered to use the copy. (ie. a polygon specified as 1 2 3 1 4 will be transformed into 1 2 3 5 4, where 5 is in the same location as 1).
"
Is there some other way to get my hands on the fields? Adding polygons or splitting vertices post creation will not work in this case, as the structure of the mesh is critical (indices of various fields must remain untouched). This will most likely be too slow as well...
(This is already done for 3ds Max and works very well)
Maya SDK (2020), C++
Any help would be appreciated!
Thanks!