[Bf-python] Mathutils

Joseph Gilbert models at paposo.com
Fri Feb 13 13:24:28 CET 2004


haha. Sorry michel I could never spell. :p And my other post size was
orginally zzzz but my spell checker changed it. I forgot a bitsy for the
rotateEuler code. Got to change it to degrees from radians:

euler_rot(Eul->eul, angle, *axis);
for(x = 0; x < 3; x++){
	Eul->eul[x] *= (180/Py_PI);
}

The function returns an incorrect result to because it uses the EulerToMat3
function in it's implementation.

EulToQuat is used:
 paste_posebuf()

EulToMat3 is used:
read_videoscape_nurbs()
object_to_mat3()
euler_rot()  //which is what Mathutils.RotateEuler() is using
apply_obmat()
transform()
shade_preview_pixel()

Im convinced that there is a problem with these two functions.  I'll see if
there is a better conversion and see if it works.
Also (as something ugly - maybe) I added the definition of Pi as Py_PI to
gen_utils.h.  There are two other definitions of pi in the blender source.
In arthrib.c and BLI_winstuff.h.  Problem is that linking either of these
files causes problems with scene.c or object.c.  It might be a better idea
to move the #define of pi in arthrib.c to arthrib.h but to make life easy i
just defined it in gen_utils.h as part of the python module.

Also, i guess i'll leave off with the math module then.  I don't know what
it would take to add a same packages of 2.3 modules like zlib and math, but
I think this would be a good thing to work on. Besides I have a box of swiss
truffles that might convice anyone!

-----Original Message-----
From: bf-python-admin at blender.org [mailto:bf-python-admin at blender.org]On
Behalf Of Willian Padovani Germano
Sent: Friday, February 13, 2004 12:47 AM
To: bf-python at blender.org
Subject: Re: [Bf-python] Mathutils

Congrats on the new module : ), I'll try it under linux tomorrow.  About
your question: besides math, other modules are necessary, specially
zlib, since some 3d formats are compressed.  So adding a few Python
modules to Blender is indeed in the plans and should be tried soon --
you may prefer to wait a little, then, your choice.  Let's try to
convince developers / platform builders to get Blender updated to the
latest Python 2.3 first, then make the test for real.  It should work,
but there's always this other option, even for zlib.

BTW: guess you mean Michel ; ) ...

--
Willian, wgermano at ig.com.br

_______________________________________________
Bf-python mailing list
Bf-python at blender.org
http://www.blender.org/mailman/listinfo/bf-python





More information about the Bf-python mailing list