I have created a rigged low-poly character which I intend to use for a crowd simulation, i.e. the plan is to create multiple linked instances of it, each with its own animation cycle, and add them to a group for particle instancing.
Some of the animation is based on shape keys which I can control via the armature. I did this by assigning a driver to the shape keys which evaluates the transforms of non-deform bones in the parent rig.
However, my drivers currently reference the armature object directly via a transform channel variable. This of course works fine for a single character but any (linked) copies I create will keep being influenced by the bone from the original rig rather than the one associated with that copy.
I saw in the Blender 2.78 release notes that driver expressions can now use "self" to refer to the object being processed. Can this be used to resolve this problem and create "instance-friendly" drivers? If so, what would the expression have to look like? How do I get from "self" (which in this case would be my mesh object) to a bone in the parent armature?
Update: I have attached a very simple demo file to illustrate the issue. There is an armature controlling the shape key of the default cube via a driver. I then created a linked copy (Alt-D) of both armature and mesh. As you can see, posing the armature of the copy (right) does nothing while the armature of the original (left) controls both instances.
For completeness' sake here's the current driver setup from the sample file:
The question is how to rephrase that expression, probably using "self", so that the driver works properly on instances as well.