Mirror Selection

hi,

instead of snapping the cursor to the center, snapping the pivot to the cursor, hitting shift-d for duplicate, execute the mirror command and specify the axis on which i want to mirror i’d like to have a script to do this.
i tried the following but in the last line seems to be an error.
does anyone know how to make this work?
or is there maybe a script for this out there already? :slight_smile:

christian

import bpy

bpy.ops.view3d.snap_cursor_to_center()
bpy.ops.mesh.duplicate_move(MESH_OT_duplicate={"mode":1}, TRANSFORM_OT_translate={"value":(0, 0, 0), "constraint_axis":(False, False, False), "constraint_orientation":'GLOBAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "texture_space":False, "remove_on_cancel":False, "release_confirm":False})
bpy.ops.transform.mirror(constraint_axis=(False, False, False), constraint_orientation='GLOBAL', proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
bpy.ops.transform.mirror(constraint_axis=(True, False, False), constraint_orientation='GLOBAL', proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
bpy.data.window_managers["WinMan"].(null)[0] = True