Is this a Bug in Blender?? (2.71)
I have a SurfCircle (Add - Surface - Nurbs Circle).
I need to retrieve the world coordinates of its vertices.
I go through the vertices and get correct world coordinates whenever the WEIGHT = 1. When the vertex weight = NOT 1, then I do not get correct vertex world coordinates. Why this??
Here is the code I am using (you can just select a SurfCircle and try it):
I attached a sample Blender file with the Surfcircle (just the 2nd vertex has a weight different to 1).
I cannot imagine that this behaviour makes any sense?
The screenshot shows that Blender displays correct world (global) coordinates to the right. But when I try to retrieve the same through Python, the values returned are wrong.
SurfCircle.blend (469 KB)
obj = bpy.context.selected_objects
wmtx = obj.matrix_world
for index in range(0, len(obj.data.splines.points)):
worldCoord = wmtx * obj.data.splines.points[index].co
print(‘vertex ’ + str(index) + str(’ world coord: ') + str(worldCoord))
#END def spline_get_vertex_worldcoordinates(