[Bf-python] Re: Possible bug with transformations
Tron Thomas
tron.thomas at verizon.net
Wed Dec 28 17:01:56 CET 2005
I don't understand the reason that it matters whether I transform the
vertex in the cube or a copy of that vertex. When I apply the
transform, either vertex should be translated to the correct position.
I don't want to modify the geometry of the cube, I just want to
determine where each vertex of the cube is located in world space.
If I move the cube to a new location, I would expect the cube's
transform to act on the vertices of its mesh (which are given in
coordinates local to that mesh) so that the vertices are now transform
into world space. Otherwise, how can I determine where objects are
located in the scene? This doesn't seem to be happening in the Python
API's for Blender 2.40, and I'm wondering if this is a bug that was
introduce into this version.
>You're making a new vector and applying the transform to the copy;
>you're not applying the transform to the mesh vertices. Try this:
>
>import Blender
>
>transform = Blender.Object.Get('Cube').getMatrix()
>mesh = Blender.Mesh.Get('Cube')
>
>for vertex in mesh.verts:
> vertex.co *= transform
>
>Ken
>
>
More information about the Bf-python
mailing list