From b6449a7da2c3ce6e320dbcb5ff7e85ac03e116d8 Mon Sep 17 00:00:00 2001 From: Swann Date: Wed, 27 Jan 2021 11:01:03 +0100 Subject: [PATCH 1/2] fix: animation deletion synchronization Related to #165 --- multi_user/bl_types/bl_datablock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/multi_user/bl_types/bl_datablock.py b/multi_user/bl_types/bl_datablock.py index 1de5a02..c9383f2 100644 --- a/multi_user/bl_types/bl_datablock.py +++ b/multi_user/bl_types/bl_datablock.py @@ -203,6 +203,9 @@ class BlDatablock(ReplicatedDatablock): if 'action' in data['animation_data']: target.animation_data.action = bpy.data.actions[data['animation_data']['action']] + # Remove existing animation data if there is not more to load + elif target.animation_data: + target.animation_data_clear() if self.is_library: return From 0a7be03c6fb7a320f4968a2355896d3b71dc2cc6 Mon Sep 17 00:00:00 2001 From: Swann Date: Wed, 27 Jan 2021 11:06:46 +0100 Subject: [PATCH 2/2] fix: animation data attribute check --- multi_user/bl_types/bl_datablock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multi_user/bl_types/bl_datablock.py b/multi_user/bl_types/bl_datablock.py index c9383f2..022bbc3 100644 --- a/multi_user/bl_types/bl_datablock.py +++ b/multi_user/bl_types/bl_datablock.py @@ -204,7 +204,7 @@ class BlDatablock(ReplicatedDatablock): if 'action' in data['animation_data']: target.animation_data.action = bpy.data.actions[data['animation_data']['action']] # Remove existing animation data if there is not more to load - elif target.animation_data: + elif hasattr(target, 'animation_data') and target.animation_data: target.animation_data_clear() if self.is_library: