Previous Thread  Next Thread

chat icon python: get vertex position after a modifier's effect

fxjeane

Posted: Mon Jun 20, 2011 4:59 am
Joined: 31 May 2011
Posts: 4
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
Reply with quote


hooper

Posted: Sat Nov 19, 2011 6:00 am
Joined: 19 Nov 2011
Posts: 2
Did you ever get this figured out? I'm trying to do a similar thing, but with armatures.
Reply with quote


fxjeane

Posted: Sat Nov 19, 2011 6:13 am
Joined: 31 May 2011
Posts: 4
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
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group