fix: catch runtime error
feat: enable build for undo branch
This commit is contained in:
@ -10,4 +10,5 @@ build:
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
- develop
|
||||
- develop
|
||||
- 132-fix-undo-edit-last-operation-redo-handling-2
|
@ -147,8 +147,12 @@ class BlDatablock(ReplicatedDatablock):
|
||||
name = self.data.get('name')
|
||||
logging.debug(f"Constructing {name}")
|
||||
datablock_ref = self._construct(data=self.data)
|
||||
for i in range(bpy.context.preferences.edit.undo_steps+1):
|
||||
bpy.ops.ed.undo_push(message="Multiuser history flush")
|
||||
|
||||
try:
|
||||
for i in range(bpy.context.preferences.edit.undo_steps+1):
|
||||
bpy.ops.ed.undo_push(message="Multiuser history flush")
|
||||
except RuntimeError:
|
||||
logging.error("Fail to overwrite history")
|
||||
|
||||
if datablock_ref is not None:
|
||||
setattr(datablock_ref, 'uuid', self.uuid)
|
||||
|
Reference in New Issue
Block a user