def initialise():
global_undo = bpy.context.user_preferences.edit.use_global_undo
bpy.context.user_preferences.edit.use_global_undo = False
object = bpy.context.active_object
if 'MIRROR' in [mod.type for mod in object.modifiers if mod.show_viewport]:
# ensure that selection is synced for the derived mesh
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.mode_set(mode='EDIT')
bm = bmesh.from_edit_mesh(object.data)
bm.verts.ensure_lookup_table()
bm.edges.ensure_lookup_table()
bm.faces.ensure_lookup_table()
return(global_undo, object, bm)
# move the vertices to their new locations
评论列表
文章目录