diff --git a/__init__.py b/__init__.py index 2ef6127..1169a46 100644 --- a/__init__.py +++ b/__init__.py @@ -22,7 +22,8 @@ from . import environment, utils DEPENDENCIES = { ("zmq","zmq"), ("umsgpack","umsgpack"), - ("yaml","pyyaml") + ("yaml","pyyaml"), + ("jsondiff","jsondiff") } diff --git a/bl_types/bl_camera.py b/bl_types/bl_camera.py index a8ad93c..c8e2cdc 100644 --- a/bl_types/bl_camera.py +++ b/bl_types/bl_camera.py @@ -1,5 +1,6 @@ import bpy import mathutils +from jsondiff import diff from .. import utils from .bl_datablock import BlDatablock @@ -27,7 +28,9 @@ class BlCamera(BlDatablock): self.pointer = bpy.data.cameras.get(self.buffer['name']) def diff(self): - return False + d = diff(self.dump(pointer=self.pointer),self.buffer) + print(d) + return len(d)>1 bl_id = "cameras" bl_class = bpy.types.Camera diff --git a/bl_types/bl_material.py b/bl_types/bl_material.py index 61b9633..1884535 100644 --- a/bl_types/bl_material.py +++ b/bl_types/bl_material.py @@ -82,11 +82,11 @@ class BlMaterial(BlDatablock): def diff(self): if self.pointer.is_grease_pencil: - self.dump(pointer=self.pointer) != self.buffer + return self.dump(pointer=self.pointer) != self.buffer else: return len(self.pointer.node_tree.links) != len(self.buffer['node_tree']['links']) bl_id = "materials" bl_class = bpy.types.Material bl_rep_class = BlMaterial -bl_delay_refresh = 1 -bl_delay_apply = 1 +bl_delay_refresh = 5 +bl_delay_apply = 5 diff --git a/libs/replication b/libs/replication index 929f624..414fc66 160000 --- a/libs/replication +++ b/libs/replication @@ -1 +1 @@ -Subproject commit 929f624919a1b56c4b5a00b824ad9f309ee403c4 +Subproject commit 414fc6629e90e2b3bd36d279e2a7ded8ade786da