python: get vertex position after a modifier's effect

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
fxjeane
Posts: 4
Joined: Tue May 31, 2011 6:52 pm

python: get vertex position after a modifier's effect

Post by fxjeane » Mon Jun 20, 2011 5:59 am

HI there.

Does any one know how to get the position of a vertex in a mesh "after" a modifier calculation? Im writing an exporter for a renderer and i would like to get the position without having to "apply" the modifier.

Cheers
fxjeane

hooper
Posts: 2
Joined: Sat Nov 19, 2011 5:58 am

Post by hooper » Sat Nov 19, 2011 6:00 am

Did you ever get this figured out? I'm trying to do a similar thing, but with armatures.

fxjeane
Posts: 4
Joined: Tue May 31, 2011 6:52 pm

Post by fxjeane » Sat Nov 19, 2011 6:13 am

Yeah, the trick was to make a snapshot of the mesh before the render and deleting it once done.

# create a snapshot of the "RENDER" mesh
self.meshdata = mesh.to_mesh(scene,True,'RENDER')
# delete the snapshot data
bpy.data.meshes.remove(self.meshdata)

Hope this helps

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests