Merge branch 'develop' of gitlab.com:slumber/multi-user into develop

This commit is contained in:
Swann 2021-03-04 15:49:00 +01:00
commit b66d0dd4ce
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB

View File

@ -296,9 +296,20 @@ class BlObject(BlDatablock):
# Load transformation data
loader.load(target, data)
# Object display fields
if 'display' in data:
loader.load(target.display, data['display'])
# Parenting
parent_id = data.get('parent_id')
if parent_id:
parent = bpy.data.objects[parent_id]
# Avoid reloading
if target.parent != parent and parent is not None:
target.parent = parent
elif target.parent:
target.parent = None
# Pose
if 'pose' in data:
if not target.pose:
@ -366,7 +377,6 @@ class BlObject(BlDatablock):
dumper.include_filter = [
"name",
"rotation_mode",
"parent",
"data",
"library",
"empty_display_type",
@ -411,6 +421,10 @@ class BlObject(BlDatablock):
if self.is_library:
return data
# PARENTING
if instance.parent:
data['parent_id'] = instance.parent.name
# MODIFIERS
if hasattr(instance, 'modifiers'):
data["modifiers"] = {}
@ -549,12 +563,13 @@ class BlObject(BlDatablock):
# Avoid Empty case
if self.instance.data:
deps.append(self.instance.data)
if self.instance.parent :
deps.append(self.instance.parent)
if self.is_library:
deps.append(self.instance.library)
if self.instance.parent :
deps.append(self.instance.parent)
if self.instance.instance_type == 'COLLECTION':
# TODO: uuid based
deps.append(self.instance.instance_collection)