How to get global coordinates from local space?

I’ve searched for 2 days now, and have not seen anyone mention how to do this (in Blender anyways). I’m trying to figure out space switching, primarily using Blenrig. Let’s say you’re animating the left arm in IK and need the hand to stop on an object (like turning a doorknob or lowering yourself down onto a chair). With Blenrig, the “Hinge” setting for the left arm would be set to 0, meaning the hand’s IK controller location is local to the rig. If you switch it on, then the location is set to global. The problem is that it causes your hand to reset the location and rotation. Coming from Maya, I know there were scripts involved where you had to convert the local rotation and translations into global, so the animation is smooth when it switches.

I’ve given python scripting a look, but I’m not primarily a programmer. I can only get so far. I’m fairly surprised there aren’t addons or much discussion on this at all. Has anyone figured out an elegant way to do space switching?

Did you ever find any info about this? I’ve been able to do it with some creative use of nulls and child to constraints, but it’s much less elegant than in Maya.

I’m not much good at rigging myself, but I would suggest checking out the tutorials “Humane Rigging” by Nathan Vegdahl. In 2 days you could learn to build your own rigs from scratch.

For my specific issue, it was a setting within BlenRig so I didn’t look further into a more general space switching technique.

Are you simply looking for a way to get the local coordinates of an object as world coordinates in python?

Because that is done with:
Select the object you want to check and:

bpy.context.object.matrix_world.translation