Under the Transform section of the Add Constraint menu is a new one called Maintain Volume.
I developed the constraint (which is extremely simple) to help with adding squash and stretch to characters. There are a number of ways to do this already, but as I’m not the world’s greatest rigger and don’t have a lot of patience for layering several tiers of controls on top of each other, I wanted an easier way. First, I tried doing it with Drivers. I figured that if I could drive the X and Z scale of a bone as a function of its Y scale that would do the trick (the equation btw is: X (or Z) scale equals the square root of the constant volume divided by the Y scale). Unfortunately, Blender didn’t like this and considered it a cyclic dependency. So, I moved on to using the Transform constraint.
Another user (mtracer) said that he’d done just such a thing with the Transform constraint, and it seems like that’s the case. I just couldn’t get it to work. I find those types of value-mapping interfaces horrible to deal with. I could have tried to do this with a PyConstraint, and in fact something like this was done by Cessen in Big Buck Bunny. Unfortunately, I’ve never done a PyConstraint before and didn’t feel like learning the new API for what should be a relatively simple effect.
So, I was at the point where most users find themselves. Yes, I could have brute-forced any of the previous four solutions (complex rig, drivers, transform constraint, py constraint). However, that doesn’t solve the problem for everyone else. We can’t expect people to be programmers just to use the software. So, I did the easiest thing for me, which was to add a constraint. You can see the effect below:
It’s in trunk, so update, compile and have fun!