Skip to content
Snippets Groups Projects
Commit e54b9d2a authored by Clemens Barth's avatar Clemens Barth
Browse files

I removed all 'del()' commands. The reason is that, e.g., the separation of an atom object

from an atomic structure in the 'EDIT' mode has lead to a crash of Blender. With the
changes done, there is no crash of Blender anymore.
parent d4674c9e
No related branches found
No related tags found
No related merge requests found
...@@ -422,7 +422,6 @@ def separate_atoms(scn): ...@@ -422,7 +422,6 @@ def separate_atoms(scn):
# Free memory # Free memory
bm.free() bm.free()
del(bm)
# Delete already the selected vertices # Delete already the selected vertices
bpy.ops.mesh.delete(type='VERT') bpy.ops.mesh.delete(type='VERT')
...@@ -668,7 +667,6 @@ def draw_obj(atom_shape, atom, new_material): ...@@ -668,7 +667,6 @@ def draw_obj(atom_shape, atom, new_material):
coll_child = get_collection_object(child) coll_child = get_collection_object(child)
coll_child.objects.unlink(child) coll_child.objects.unlink(child)
bpy.ops.object.delete() bpy.ops.object.delete()
del(child)
# Deselect everything # Deselect everything
bpy.ops.object.select_all(action='DESELECT') bpy.ops.object.select_all(action='DESELECT')
...@@ -682,7 +680,6 @@ def draw_obj(atom_shape, atom, new_material): ...@@ -682,7 +680,6 @@ def draw_obj(atom_shape, atom, new_material):
coll_old_atom.objects.unlink(atom) coll_old_atom.objects.unlink(atom)
# Delete the old atom # Delete the old atom
bpy.ops.object.delete() bpy.ops.object.delete()
del(atom)
#if "_F2+_center" or "_F+_center" or "_F0_center" in coll_old_atom: #if "_F2+_center" or "_F+_center" or "_F0_center" in coll_old_atom:
# print("Delete the collection") # print("Delete the collection")
...@@ -982,7 +979,6 @@ def draw_obj_special(atom_shape, atom): ...@@ -982,7 +979,6 @@ def draw_obj_special(atom_shape, atom):
coll_atom.objects.unlink(atom) coll_atom.objects.unlink(atom)
# Delete the old atom # Delete the old atom
bpy.ops.object.delete() bpy.ops.object.delete()
del(atom)
return new_atom return new_atom
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment