Skip to content

Commit

Permalink
fix: fix up mirror across geometry invalid selection cleanup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-hm committed May 7, 2022
1 parent 1ebc4ac commit 97873a4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions power_mods/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,16 @@ def has_invalid_selection(self, context):

def complete_geometry_mode(self, context):
if self.has_invalid_selection(context):
self.clean_up(context)
if self.selection_type == 0:
bpy.ops.object.mode_set(mode='OBJECT')
context.object.show_in_front = False
bpy.ops.object.delete()

self.select_reference_objs(context)

unregister_draw_handler()
unregister_axis_handler()

if self.geometry_selection_type == 0:
self.report({'ERROR_INVALID_INPUT'}, "Ensure only a single vertex, or exactly 3 vertices are selected.")
else:
self.report({'ERROR_INVALID_INPUT'}, "Ensure only a single edge or face is selected.")
Expand Down

0 comments on commit 97873a4

Please sign in to comment.