Skip to content

Commit

Permalink
Add debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
Weisl committed Jun 29, 2023
1 parent e1a5c83 commit dacbb9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion collider_shapes/add_bounding_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def execute(self, context):
context.view_layer.objects.active = obj
bounding_box_data = {}

# EDIT is only supported for 'MESH' type objects and only if the active object is a 'MESH'.
# EDIT is only supported for 'MESH' type objects and only if the active object is a 'MESH'
if self.obj_mode == "EDIT" and base_ob.type == 'MESH' and self.active_obj.type == 'MESH':
used_vertices = self.get_vertices_Edit(obj, use_modifiers=self.my_use_modifier_stack)
else: # self.obj_mode == "OBJECT":
Expand Down
10 changes: 6 additions & 4 deletions collider_shapes/add_bounding_primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,8 +1031,9 @@ def cancel_cleanup(self, context):
objs.remove(obj, do_unlink=True)

# Delete temporary objects
self.remove_objects(self.tmp_meshes)
self.remove_empty_collection('tmp_mesh')
if self.prefs.debug == False:
self.remove_objects(self.tmp_meshes)
self.remove_empty_collection('tmp_mesh')

# delete original data
for data in self.original_obj_data:
Expand Down Expand Up @@ -1293,8 +1294,9 @@ def modal(self, context, event):
obj.show_wire = False

# Delete temporary generated meshes
self.remove_objects(self.tmp_meshes)
self.remove_empty_collection('tmp_mesh')
if self.prefs.debug == False:
self.remove_objects(self.tmp_meshes)
self.remove_empty_collection('tmp_mesh')

try:
bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
Expand Down

0 comments on commit dacbb9c

Please sign in to comment.