Hi all,
I am developing a polygon reduction plug-in for Maya, based on our product Rational Reducer.
I have implemented the plug-in as a dependency graph node (which does the actual work) and a set of MEL commands that insert the node between the construction history and output node. If no construction history is available, a copy of the output node is created and used for history.
Now, all this is working quite good, but I have encountered a problem. When dealing with objects with multiple materials, I would like to preserve the different materials on the reduced mesh as well. However, I find no easy way of getting and setting the group membership (where each group is connected to a different shader node) for each polygon in a mesh.
I have seen that in cases where I have multi-material objects, there are often some groupParts and groupId nodes in the construction history. I guess I could implement my checking and setting of the material groups with these nodes, but I thought it would be much easier to access it from the actual mesh. On polygon objects without construction history, the group information is after all "baked" into the mesh.
I hope there are people out there with more Maya experience that can help me out here.
Best regards,
Terje