My problem is that the polygon I created with MFnMesh has no shading attribute on it.
Which class should I use in combine with this?
Thanks,
Wech
Maya API Object Creating with MFnMesh
more info needed. Do you mean that you have not specified the surface normals for your poly? or does the entire mesh lack lighting? are you actually missing attributes from the created mesh? does it get created without a material assigned?
Hi,
What i’m doing now is trying to import md2 file into maya.
I’ve collected all the data and creating meshes using:
mesh[i].create(header->numVertices, header->numTriangles, vertexArray, polygonCounts,
polygonConnects, MObject::kNullObj, &status);
and then assign UVs later to mesh 1 by using MFnMesh::setUV and MFnMesh::assignUV, so that when I create blend shape, this UVs will be assigned to all the rest.
The polygons are created correctly except that they have no default material on. So I have to assign metterial + texture manually.
I’m really new to Maya and its API, so it’s quite confusing on how to mix up the nodes by the API. I did research from the web and hardly found any tutorial on how to create mesh, most of them more concern on how to extract obj from the scene. I’ve passed some MPxXX tutorials, but still not sure if that’s the way to go.
Thanks,
Wech
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.