[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26239] trunk/blender: Mathutils refactor & include in sphinx generated docs, (TODO, include getset'ers in docs)

Campbell Barton ideasman42 at gmail.com
Thu Feb 4 09:36:56 CET 2010


Hi Bjornmose,
Mathutils is one of the few modules which remains mostly the same in
2.5x, since most of the other apis around it are now accessed as rna
most scripts from 2.4x need a fair bit of porting anyway.

In the console did you try auto-complete yet.

>>> mat = Mathutils.Matrix()
col_size  copy(  determinant(  identity(  invert(  is_negative
is_wrapped  median_scale  resize4x4(  rotation_part(  row_size
scale_part(  to_euler(  to_quat(  translation_part(  transpose(  zero(
mat.

If we are to have some error, I'd add an exception on scalePart that
points to scale_part, but I think when porting scripts from 2.4x this
is only one of many issues.
Not to say its unimportant but if you port a script I think youll need
to keep the api reference handy.

The new Mathutils docs can be found from blender in 3 steps.
Help (Menu) -> Python API Reference -> Math Types & Utilities (Mathutils)

Id prefer to have a wiki page with info about porting 2.4x scripts
then deprecating functions and keeping them around.

On Thu, Feb 4, 2010 at 2:05 AM, bjornmose <bjornmose at gmx.net> wrote:
> bjornmose schrieb:
>> Hi, all ..
>> was trapped by this .. - Matrix.scalePart --> Matrix.scale_part ..
>> getting a
>> ' matrix' object has no attribute  'scalepart' ..
>>
>> It was pretty obvious there must have been some changes in the python
>> interface ..
>> so, I did find my way, using some popular search engines ..
>> How ever,
>> I'd rather  see those deprecated python function calls to respond
>> something like:
>> ' - Matrix.scalePart  has been replaced
>>   by Matrix.scale_part
>> '
>> on the console
>> rather than 'dunno what u want'
>> me 2 cents
>> BM
>>
>>
> and as it looks like :
> there is no backward/forward compatibility  to old  .blend  files ..
> (containing python scripts )  which was a ++ for blender for quite a
> while :)
> (admit some flakes from going 2.4x to 2.5 ) but in 2.5, i think we
> should stick to it.
> BM
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
- Campbell


More information about the Bf-committers mailing list