I am talking about the inverse matrix of the parent when the child is connected. It’s supposed to be stored (blender itself stores it) in the child, but I can’t find it in python api -> object which would be the logical place. If I understand things correctly, I need it for a truly blenderlike object hierarchy in my ascii exporter.
Hello!
I’m not sure i understand what you’re trying to do: An object matrix (object.getMatrix(‘localspace’) transforms from the object’s local coordinate system to the system of it’s parent (or world if there’s no parent).
If you need to go the other direction from a parent coordinate system to the coordinate system of the child you have to take the child’s matrix and invert it:
m = childobject.getMatrix('localspace').copy()
# i allways create a copy since the matrix data might be wrapped - though the documentation doesn't say so for 'localspace'
m.invert()
Michael
Well there’s a slight disconnect there in the hierarchy, the local location (object.getLocation(‘localspace’)) seems to stay in the global coordinate-system (of the moment it was added to the parent). This is a problem when you want to use ipo’s outside of blender because the matrix that’s missing transforms local location etc into the true localspace… I think I can solve it, shouldn’t be too hard, but I’d hate to compromise precision because of it.