[Bf-python] object's local matrix

Willian Padovani Germano wgermano at superig.com.br
Tue Jun 27 15:16:22 CEST 2006


Hi all,

Was helping a user that posted a msg to blender.org's Python forum 
complaining that ob.matrixLocal was not returning what he expected. 
After a little testing and research I came to this (well known thread, 
but I hadn't seen its last msgs):

http://www.blender3d.org/forum/viewtopic.php?t=4566&highlight=parent+inverse+matrix&sid=a957bcac39d260b01f29acfd4b255e61

In short, for those that as me until yesterday might not be aware: what 
we return as the local matrix is not what users expect, it's not an 
object's position in relation to its parent.

Currently scripters can use

ob.parent.getInverseMatrix() * ob.matrixWorld

to get the proper local matrix, as theeth points in that thread. But 
it's confusing to have .matrixLocal the way it is.

What do we do?

1) Change .matrixLocal to what it should be and possibly add another 
attribute .matrixSomething to return what .matrixLocal currently returns.

2) Add a new .matrixParent attribute with the proper local matrix as 
users expect.

Strong opinions anyone?

--
Willian



More information about the Bf-python mailing list