From 3e552cb4062fd910ad9a5aed4d497d57638f8db2 Mon Sep 17 00:00:00 2001 From: Swann Date: Tue, 22 Jun 2021 10:39:40 +0200 Subject: [PATCH] feat: gpencil materials animation support --- multi_user/bl_types/bl_material.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/multi_user/bl_types/bl_material.py b/multi_user/bl_types/bl_material.py index bac300d..8ab3099 100644 --- a/multi_user/bl_types/bl_material.py +++ b/multi_user/bl_types/bl_material.py @@ -426,8 +426,9 @@ class BlMaterial(ReplicatedDatablock): if datablock.node_tree is None: datablock.use_nodes = True - load_animation_data(data.get('animation_data'), datablock.node_tree) load_node_tree(data['node_tree'], datablock.node_tree) + load_animation_data(data.get('nodes_animation_data'), datablock.node_tree) + load_animation_data(data.get('animation_data'), datablock) @staticmethod def dump(datablock: object) -> dict: @@ -495,8 +496,10 @@ class BlMaterial(ReplicatedDatablock): data['grease_pencil'] = gp_mat_dumper.dump(datablock.grease_pencil) elif datablock.use_nodes: data['node_tree'] = dump_node_tree(datablock.node_tree) + data['nodes_animation_data'] = dump_animation_data(datablock.node_tree) + + data['animation_data'] = dump_animation_data(datablock) - data['animation_data'] = dump_animation_data(datablock.node_tree) return data @staticmethod @@ -510,8 +513,7 @@ class BlMaterial(ReplicatedDatablock): if datablock.use_nodes: deps.extend(get_node_tree_dependencies(datablock.node_tree)) - - deps.extend(resolve_animation_dependencies(datablock.node_tree)) + deps.extend(resolve_animation_dependencies(datablock)) return deps