Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Get shader name for face?

Get shader name for face?

Anonymous
Not applicable
325 Views
0 Replies
Message 1 of 1

Get shader name for face?

Anonymous
Not applicable
Hi there, I'm writing an exporter and I need to get the material name for each face. Does anyone know the simplest way to do this, i have the poly iterator like this:


while (!iter_polys.isDone())
{
out_file << "f ";

unsigned int vert_count = iter_polys.polygonVertexCount();
for (unsigned int i = 0; i < vert_count; i++)
{
int uv_index;
iter_polys.getUVIndex(i, uv_index);
out_file << (iter_polys.vertexIndex(i) + 1) << "/" << (uv_index + 1) << "/" << (iter_polys.normalIndex(i) + 1) << " ";
}

out_file << "\n";

iter_polys.next();
}


Thanks!
0 Likes
326 Views
0 Replies
Replies (0)