[Bf-python] Object matrix writable?

Jonathan Merritt j.merritt at pgrad.unimelb.edu.au
Mon May 26 04:26:32 CEST 2003


Hi,

> I think it would be a good addition to the API to be able to set the 
> matrix directly - is there any cons in this?


AFAIK (please correct me if necessary :^), the one major objection to 
doing this is that a 4x4 homogeneous transformation matrix can represent 
some transform types, such as shear, perspective, etc., which don't have 
equivalent operations within Blender.

The matrix also currently has an _intrinsically_ different meaning to 
the translation and rotation components which you can read and set on an 
object.  Try parenting an object to another and then animate both of 
them.  The child object's translation and rotation are measured 
_relative_ to the parent object, but its transformation matrix is 
(apparently - I have deduced this only by trial and error) always 
relative to world space.  Hence, there are semantic problems with 
allowing the matrix to be set.  The matrix can always be deduced from 
the current object parameters and the object heirarchy, but performing 
the inverse operation may prove more difficult.

Thoughts everyone... ?

BTW - Please correct any errors in the above.  I'm only really a Python 
user at this stage and have only superficially glanced at the 
implementation code.

Jonathan Merritt.






More information about the Bf-python mailing list