feat: delta commit

This commit is contained in:
Swann 2021-05-09 17:42:56 +02:00
parent 32033c743c
commit a67be76422
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB
4 changed files with 7 additions and 8 deletions

View File

@ -21,7 +21,7 @@ from pathlib import Path
import bpy
import mathutils
from deepdiff import DeepDiff
from deepdiff import DeepDiff, Delta
from replication.constants import DIFF_JSON, MODIFIED
from ..utils import flush_history
@ -555,4 +555,4 @@ class BlScene(BlDatablock):
if not self.preferences.sync_flags.sync_active_camera:
exclude_path.append("root['camera']")
return DeepDiff(self.data, self._dump(instance=self.instance), exclude_paths=exclude_path)
return Delta(DeepDiff(self.data, self._dump(instance=self.instance), exclude_paths=exclude_path))

@ -1 +1 @@
Subproject commit 64632ffaee97f4ad3015eba674fa4ef9173b14c1
Subproject commit 553f3d43b59aad9e695266d95abba8e8307f2123

View File

@ -930,8 +930,7 @@ def update_external_dependencies():
nodes_ids = session.list(filter=bl_types.bl_file.BlFile)
for node_id in nodes_ids:
node = session.repository.get_node(node_id)
if node and node.owner in [session.id, RP_COMMON] \
and node.has_changed():
if node and node.owner in [session.id, RP_COMMON]:
session.commit(node_id)
session.push(node_id, check_data=False)
@ -1004,9 +1003,8 @@ def depsgraph_evaluation(scene):
if node and (node.owner == session.id or node.bl_check_common):
if node.state == UP:
try:
if node.has_changed():
session.commit(node.uuid)
session.push(node.uuid, check_data=False)
session.commit(node.uuid)
session.push(node.uuid, check_data=False)
except ReferenceError:
logging.debug(f"Reference error {node.uuid}")
if not node.is_valid():

View File

@ -72,6 +72,7 @@ class Timer(object):
except Exception as e:
logging.error(e)
self.unregister()
traceback.print_exc()
session.disconnect(reason=f"Error during timer {self.id} execution")
else:
if self.is_running: