I'm in the middle of writing a new facial pipeline for Red9 clients and and trying to get a solid corrective sculpt pipeline up and running, but I'm hitting issues with blendshapes, or rather, the god awful support that Maya has for actually editing them in code.
So case in point, I'm sculpted the 'jaw_open' shape already and I want to re-sculpt it, and replace that target in the blendshape, but try as I might I'll be damned if I can get the blendshape command to behave as I want. Adding new targets is easy, but replacing them feels like pulling teeth.
cmds.blendShape(sculptBlend, edit=True, t=(faceMesh, activeTargetIndex, activeSculpt, 1))
Anybody got any good pointers for this, I'd assumed that something like the above would work, where sculptBlend is the blend node, faceMesh is the baseMesh, targetIndex is the current index of the target I want to update and activeSculpt is the new sculpt to replace it with, but it doesn't seem to have the effect.
Neither does removing a target from the blend. Surely there has to be better support for this stuff as at the moment the safest way seems to be just to recreate the blendNode each time. I know we've done it like this in the past because of similar issues managing the blendShape node. The issue I have with this project is that we're sculpting ontop of a pretty heavy mesh and keeping all the targets in the scene is bloating it massively.
Any pointers guys??
thanks
Mark