Hey good question! I believe we've prototyped some tools for this sort of thing internally. But in the meantime you could use python to manipulate weight maps. I'll assume for the time being that you're manipulating maps for geometry that matches topologically.
There's faster ways to get/set deformer weights but I'll just show some basic lines of code so you can get an idea of what's going on.
Let's say you want to get the weight map for an attachment:
attachment_name = "zAttachment1"
attachment_weights = list(mc.getAttr("%s.weightList.weights" % attachment_name))
And then here's a function to invert any weight list.
out_weights = list()
for w in weight_list:
So now you can pass the attachment weights to the invert_weights function, and then apply the inverted weights to, say, a material layer:
inverted_weights = invert_weights(attachment_weights)
zmaterial_name = "zMaterial2"
for i, w in enumerate(inverted_weights):
mc.setAttr(zmaterial_name+".weightList.weights[%i]" % i, w )
Just a trivial example there, but hopefully gives you an idea 🙂