import bpy bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.select_by_type(type='MESH') bpy.ops.object.editmode_toggle() bpy.ops.mesh.remove_doubles() bpy.ops.mesh.vert_connect_nonplanar() bpy.ops.mesh.vert_connect_concave() bpy.ops.object.editmode_toggle() # https://github.com/kmammou/v-hacd print_entity_start(worldspawn_props) o = bpy.data.scenes['Scene'].objects['Suzanne'] # o.location = 1, 2, 3 # bpy.context.scene.update() mw = o.matrix_world me = o.data me.update(calc_tessface=True) #print("Mesh: %s, tessfaces: %d, vertices: %d"%(o.name,len(me.tessfaces),len(me.vertices))) print_brush_start() for fa in me.tessfaces: print(" Face %d"%fa.index) print(" Normal\t(local): ", fa.normal)