I am having a hard time understanding how Maya works under the hood.
Somehow I am losing all my material assignments between sessions, even though the graph has not visibility changed on the surface.
When I set up my scene, all the materials are present, but when I save and reload the file, all the materials are gone and the shadingGroups are empty. The groups still have their input and output connections to the mesh nodes, but everything else is gone.
Here is what I’m doing in a nutshell…
Take a model with half a dozen materials on it, and some color sets. Duplicate the model. Create a polyColorMod node and blendColorSet node.
Feed the original object into the polyColorMod (outMesh > inputPolymesh), feed the polyColorMod into the blendColorSet node (output > inputPolymesh) and feed the output of the blendColorSet into the duplicate object (output > inMesh).
Finally, I change the input mesh into an intermediate object.
So what I have is basically bookends around some color set modifications. One each side is the same set of geometry, materials, and colorsets. This allows me to paint and edit the mesh on the input side, tweak some colorSet data and see the results live on the ouput Mesh.
All of this works fine until I save the scene and re-open…the shading groups only remember their assignment to the input polymesh, and the ouput mesh has lost all its shading data. Before saving the scene, I can query the shadingGroups and see that they’re are affecting identical lists of faces on each mesh, but when I open the scene, only the input mesh remembers its materials.