I’m trying to figure out how deformerWeights() works with multiple shapes and one deformer.
Eg: I have ffd1 applied on pCone1 and pCube1. I’m exporting and imoprting the painted weights with:
import os
import maya.cmds as mc
home_dir = os.environ["HOME"]
path= os.path.join(home_dir, "weights")
if not os.path.exists(path):
os.makedirs(path)
# Export
mc.deformerWeights("weights.json", export=True, deformer="ffd1", fm="JSON", path=path, shape=['pCubeShape1', 'pConeShape1'])
# import
mc.deformerWeights("weights.json", im=True, deformer="ffd1", fm="JSON", path=path)
The data in json file is correct but I get Maya crash when import it. So what is the way guys you use to handle this?
Or maybe I should just write my own import/exporter?