Here’s more details:
I have two nearly identical models A and B. B was modified by another tool, and as a result B only has the default lambert shader. I want to copy materials form A to B. Model A has several shaderGroups, each applied to different UV shells: one for the head, one for the torso, etc. So for example I want to copy the material form the UV shell of the head on A onto the UV shell for the head on B
Alt+F12 sets Maya’s viewport selection mode to UV shells, I select a set of faces on A in this mode. So only the faces of a single UV shell ( and a single shaderGroup) are in the selection.
the “Copy” button in the tool will search the connections of the first face in the selection list for the shaderGroup it uses, and store it.
The user then selects a new UV shell on mesh B, and the “paste” button will apply the stored shader to the selected face
It’s not very robust - no provision for multiple shaders assigned to a single selection, but it solves the problem at hand