[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/python/api2_2x Object.c blender/source/blender/python/api2_2x/doc Object.py

Martin Poirier theeth at yahoo.com
Wed Nov 22 00:14:08 CET 2006


--- Ken Hughes <khughes at pacific.edu> wrote:

> khughes (Ken Hughes) 2006/11/21 22:15:15 CET
> 
>   Modified files:
>     blender/source/blender/python/api2_2x Object.c 
>     blender/source/blender/python/api2_2x/doc
> Object.py 
>   
>   Log:
>   Python API
>   ==========
>   
>   Bugfix #4951:  This might be a serious change for
> python script writers.
>   -- ob.getMatrix('localspace') did not return the
> correct matrix when the object
>      had a parent; this has been corrected.
>   -- ob.setMatrix(m) did not work predictably (more
> correctly, in an easy-to-
>      predict manner) when an object had a parent. 
> The method has been changed
>      so that if thee is a parent, it ASSUMES the
> matrix is "localspace",
>      relative to the parent.  The documentation now
> states this.
>   -- ob.mat and ob.matrix are now read-only
> attributes, while ob.matrixLocal
>      (which calls Object_setMatrix() ) is now
> read-write.
>   
>   Ton is not thrilled (is that a fair summary, Ton?
> ;-) with this method since
>   the ob->obmat is calculated from the loc/rot/size
> attributes of an object.
>   I'll let him speak on this, but I believe his
> desire is for this method to be
>   deprecated in the future and replaced with
> something else.


I'm not thrilled either. Not only is ob->obmat
calculated from loc/rot/size, it represents the final
orientation matrix of the object, including parenting
*and* constraints. Therefore, writing the local
(relative to parent) constraint can be unpredictable
in cases that involve constraints. It would be much
more useful (to me) to be able to write the global
orientation matrix.

Martin


 
____________________________________________________________________________________
Sponsored Link

Mortgage rates near 39yr lows. $420k for $1,399/mo. 
Calculate new payment! www.LowerMyBills.com/lre


More information about the Bf-committers mailing list