2.40 api breaks bundled script

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
xand
Posts: 33
Joined: Wed Oct 16, 2002 9:46 am

2.40 api breaks bundled script

Post by xand »

my bundled script 'axis rotation copy' doesn't work anymore with the 2.40 alpha.
there's a change in Mathutils with the definition of the size of the matrix in Matrix.toQuat()

the console log : "Traceback (most recent call last):
File "<string>", line 105, in ?
AttributeError: Matrix.toQuat(): inappropriate matrix size - expects 3x3 matrix"

but the strangest it's that i don't use .toQuat() in the script
the line affected is :

Code: Select all

rotcible=cible.mat.toEuler().toMatrix()
so what happens to Mathutils and where can i find a good documentation to have working script ?

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

The toQuat() error string also appears - somewhat incorrectly - in toEuler().

The code is checking for a 3x3 matrix.

ascotan
Posts: 0
Joined: Thu May 29, 2003 10:32 pm
Location: Maryland, U.S.

Post by ascotan »

lol your right. will fix the error string.

You can only make 3x3 matrices into eulers.

xand
Posts: 33
Joined: Wed Oct 16, 2002 9:46 am

Post by xand »

thanks, i add .rotationPart() before .toEuler() and it works.
but it will be cool to add a method to extract the real rotation part of the matrix without the scale.
so i cand avoid the use of .toEuler().toMatrix()

+++

ascotan
Posts: 0
Joined: Thu May 29, 2003 10:32 pm
Location: Maryland, U.S.

Post by ascotan »

I'll see what I can do. :)

Post Reply