[Bf-python] Possible bug with transformations
Tron Thomas
tron.thomas at verizon.net
Tue Dec 27 19:34:20 CET 2005
I have run across what I think is a bug in the Python scripting API.
I wanted to run it pass people on this mailing list to make sure.
From the default scene, I ran the following script:
import Blender
transform = Blender.Object.Get('Cube').getMatrix()
mesh = Blender.Mesh.Get('Cube')
for vertex in mesh.verts:
position = Blender.Mathutils.Vector(vertex.co)
position.resize4D()
position *= transform
position.resize3D()
print position
This produced the following output:
[1.000000, 1.000000, -1.000000](vector)
[1.000000, -1.000000, -1.000000](vector)
[-1.000000, -1.000000, -1.000000](vector)
[-1.000000, 1.000000, -1.000000](vector)
[1.000000, 0.999999, 1.000000](vector)
[0.999999, -1.000001, 1.000000](vector)
[-1.000000, -1.000000, 1.000000](vector)
[-1.000000, 1.000000, 1.000000](vector)
I then translated the cube one unit along the X axis and ran the
script again. I got the same output. It seems that the X component
of the outputted vectors should have ranged between zero and 2 rather
than -1 and 1.
How correct is this assumption?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20051227/97f791cf/attachment.html>
More information about the Bf-python
mailing list