python: get vertex position after a modifier's effect

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

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

python: get vertex position after a modifier's effect

Postby 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

Postby 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

Postby 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


Return to “Coding Blender”

Who is online

Users browsing this forum: No registered users and 1 guest