fix:diff issues

This commit is contained in:
Swann 2019-08-27 17:09:46 +02:00
parent e4ba06136e
commit 7e14227337
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import bpy
import mathutils
from jsondiff import diff
from .. import utils
from .bl_datablock import BlDatablock

View File

@ -84,8 +84,9 @@ class BlMaterial(BlDatablock):
self.pointer = bpy.data.materials.get(self.buffer['name'])
def diff(self):
diff_rev = diff(self.dump(pointer=self.pointer), self.buffer)
return (self.bl_diff() or
len(diff(self.dump(pointer=self.pointer), self.buffer)) > 1)
len(diff_rev.keys()) > 1)
bl_id = "materials"

View File

@ -34,7 +34,7 @@ class BlObject(BlDatablock):
def load(self, data, target):
# Load other meshes metadata
# dump_anything.load(target, data)
utils.dump_anything.load(target, data)
target.matrix_world = mathutils.Matrix(data["matrix_world"])