[Bf-python] axis copy needs a short improvement

BF-Xand bf-xand at wanadoo.fr
Tue Jul 4 19:43:05 CEST 2006


Hi, i wrote this script. jms kindly did some adjusts.
for your questions :

>1. Is there any reason to rotate the mesh data?, why not modify the
>     existing objects matrix by the rotation matrix of the source
>     object- that way its not limited to meshes.
  the script permit to modify the orientation of the axis of a mesh without
moving the verts. so you need to rotate the verts to let them in position.
(there's an issue if the mesh have non uniform scale but the source object
can be non uniform)

>   2. cible.mat.rotationPart().toEuler().toMatrix()  can be replaced
>      with   cible.getEuler('worldspace').toMatrix()

i tried and it doesn't gave the same matrix. first, i used
toEuler().toMatrix because the rotationPart() wasn't the true rotation part.
it contains also the scale part.


that's not a great piece of code but works. i managed to update it when the
api will be a little more 'updated' (for example, the discussion about the
inversion of a matrix).
the best will be to have the possibility to modify the axis directly in
blender with the widget but i can't code this.

if the script still do the same things, you can modify it. i'll take care of
your improvments

xand




More information about the Bf-python mailing list