fix: repair broken linked objects

This commit is contained in:
Swann Martinez 2019-10-14 13:40:41 +02:00
parent e98ff91a5b
commit 9915fa83e1
No known key found for this signature in database
GPG Key ID: 414CCAFD8DA720E1
3 changed files with 6 additions and 6 deletions

View File

@ -20,6 +20,7 @@ class BlDatablock(ReplicatedDatablock):
self.load = self.load_library
self.dump = self.dump_library
self.diff = self.diff_library
self.resolve_dependencies = self.resolve_dependencies_library
if self.pointer and hasattr(self.pointer, 'uuid'):
self.pointer.uuid = self.uuid

View File

@ -20,9 +20,6 @@ class BlLibrary(BlDatablock):
def resolve(self):
self.pointer = utils.find_from_attr('uuid', self.uuid, bpy.data.libraries)
# def diff(self):
# return (self.bl_diff())
def is_valid(self):
return bpy.data.libraries.get(self.data['name'])

View File

@ -14,7 +14,9 @@ class BlObject(BlDatablock):
targetData.objects = [
name for name in sourceData.objects if name == self.data['name']]
return targetData.objects[self.data['name']]
instance = bpy.data.objects[self.data['name']]
instance.uuid = self.uuid
return instance
# Object specific constructor...
if "data" not in data: