mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Allow disabling undo on save
The transaction system does not scale on large scale or complex remove_deep deletions. So if you want to delete a mesh with many thousands of vertices, it becomes very, very slow. Unfortunately we cannot also clear Blender's undo history, so this advanced feature should be used carefully. Tested: - deleting 250 average objects: 264s before, 246s after (6.8% faster) - deleting 1 object with 6,000 vertices: 5 minutes and counting (basically impractical) before, 11s after
This commit is contained in:
@@ -203,7 +203,8 @@ class file(object):
|
||||
self.history.pop(0)
|
||||
|
||||
def begin_transaction(self):
|
||||
self.transaction = Transaction(self)
|
||||
if self.history_size:
|
||||
self.transaction = Transaction(self)
|
||||
|
||||
def end_transaction(self):
|
||||
if self.transaction:
|
||||
|
||||
Reference in New Issue
Block a user