I’m a bit frustrated because I’ve spent my entire holiday weekend overhauling my character rigging system, so that I can finally take the plunge to linking instead of appending to scenes. No more 1.5 gig scene blend files for me!
Key shape keys (like facial expressions) are driven by a UI made of control bones, and I’ve similarly automated most corrective shape keys… but some character/clothing models have a lot of shape keys for little manual tweaks. So I made a script to go through the meshes that are parented to a rig, and for each one make a custom property group on the rig with lists of shape keys, masks, and basic things like hide and hide_render, and make drivers for all of them linked to those custom properties, so I can control them from my rig’s python UI panel.
That seemed to be working fine until I tried this with multiple characters in one scene. Now blender is throwing errors like crazy. The UI panels for one character is trying (and failing) to access custom properties that only exist on a different character, and various other things.
I’ll link to the script, but rather than trying to troubleshoot the specifics of my code, I figured I should check in and see if this is even remotely the right approach. Perhaps my google-fu is poor, but I haven’t had any luck finding any discussions of how to actually link to and a complex rig with lots of properties like this. Everything I can find just goes through the basic steps: make a group with armature and body mesh, link in new file, make proxy for rig, and boom, you are done.
This leaves me still ignorant of what to do if I need to, for example, control the pockets and zippers on clothing, and manually use a dozen case-specific shape keys on a character’s body, or whatever. Do I have to drive EVERY parameter I want to change with a bone? If so, I guess I can, but whoah boy, that’s a big back-to-the-drawing-board moment.
Here is my code:
It generates files such as this:
Per-character custom property groups definitions (register and import when linking): https://pastebin.com/VkdWgUpD
One-time initialization of custom properties: https://pastebin.com/yruH4ja8
I have a simple UI script that makes a panel with collapsing menus so I can access these values.
So basically, is this the wrong approach? Should I give up on having a nice control panel in the blender UI, and just make bones for every single thing I’ll ever want to change?
I don’t expect someone to troubleshoot my specific problems, but I’m outlining what I am doing here so that hopefully someone can point me in the direction of the RIGHT way to do all of this.
Thanks for your time. I appreciate it.