During the past few weeks I’ve been writing a bunch of Python code to do various things, and somewhere I think I read about a function in Blender’s Python API that would properly transform an object’s vert into world coords. The benefit was it was implemented in C/C++ and therefore faster than rolling your own in Python.
However, in looking at the NMesh/NMVert/Object API I don’t see anything like this with 2.36.
Perhaps this was mentioned as either a future feature or a wishlist item somewhere? Anybody know anything about this?
Perhaps so. I did try getRawFromObject() on my simple test mesh, and the data is the same. Which makes sense, since the mesh isn’t subsurfed, latticed, nor an armature.
#From api2_2x cvs doc
# This script outputs deformed meshes worldspace vertex locations
# for a selected object
import Blender
from Blender import NMesh, Object
ob = Object.GetSelected()[0] # Get the first selected object
me = NMesh.GetRawFromObject(ob) # Get the objects deformed mesh data
me.transform(ob.matrix)
for v in me.verts:
print 'worldspace vert', v.co