| Code: |
| from Blender import Mesh, Scene
import BPyMesh import numpy as np scn = Scene.GetCurrent() ob = scn.getActiveObject() me = BPyMesh.getMeshFromObject(ob) # gets a mesh from the object with modifiers applied, also so transform wont effect the original mesh data. me.transform(ob.matrixWorld) # transforms the mesh by the loc/size/rot of the object coordinates = [] for v in me.verts: coordinates.append([v.co.z, v.co.y]) |
| Code: |
| import bpy
myobj = bly.context.object.data coordinates = [] for v in me.vertices: coordinates.append([v.co.z, v.co.y]) |
| Code: |
| import bpy
ob = bpy.context.object me = ob.to_mesh(bpy.context.scene, True, 'PREVIEW') # or 'RENDER' me.transform(ob.matrix_world) coordinates = [] for v in me.vertices: coordinates.append([v.co.z, v.co.y]) # to_mesh() creates a new mesh, should remove it if not needed afterwards bpy.data.meshes.remove(me) |