Previous Thread  Next Thread

chat icon vertices.co.z always 0.0 - inline python

ros2468

Posted: Wed Nov 21, 2012 3:35 am
Joined: 21 Nov 2012
Posts: 1
Hello,
Im using the inline console for retrieving vertex data of a plane triangle, but the vertexes z axis value seem to be wrong.
Link to picture
Reply with quote


CoDEmanX

Posted: Wed Nov 21, 2012 2:08 pm
Joined: 05 Apr 2009
Posts: 694
if you use the "old" bpy api, you need to toggle edit mode, or you will still get the vertex locations as they were before you entered edit mode.

bpy.ops.object.mode_set(mode='OBJECT')

you can avoid changing mode by using the bmesh module
http://www.blender.org/documentation/blender_python_api_2_64_9/bmesh.html
_________________
I'm sitting, waiting, wishing, building Blender in superstition...
Reply with quote


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