HumanIK automation - deleting of Custom Rigs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I'm working on a bit of a python wrapper around humanIK for my particular pipeline - namely setting up a pre-defined custom Character rig Definition, a motion capture skeleton definition, swapping the motion source, and baking it - and it all works (yay!)
Except for one small thing. I'd like to be able to bake the motion only for a specific frame range, to preserve existing animation in the scene. The humanIK-specific mel bake command ('hikBakeCharacter') doesn't allow me to do that, and only accepts a character as a parameter - it just bakes the entire time slider range.
I can use cmds.bakeSimulation to pass a frame range, but the resultant issue is that cmds bake Simulation is lacking the humanIK specific functions that I'm needing - namely, disentangling the rig from the constraints and additional quatToEuler/pairBlend/etc nodes that humanIK seems to use to retarget motion prior to it's bake process. So the motion bakes, but the rig is still unusable because it's still attached to humanIK.
The crux of the problem: 'hikDeleteCustomRig' does exactly what I want it to do, after I cmds.bakeSimulation, running it deletes the rig definition and detaches the rig from the constraints, but it gives a confirmation popup first - not ideal from a user-experience POV.
So my question, and the TLDR - is there a way to completely remove all humanIK-created nodes and constraints from a scene cleanly, preferably without a popup?