fix: animation data error

This commit is contained in:
Swann 2021-03-26 16:14:27 +01:00
parent e659b7da94
commit 9c7043e84c
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB
4 changed files with 8 additions and 6 deletions

View File

@ -231,9 +231,11 @@ def load_animation_data(data, datablock):
datablock.animation_data_clear()
def get_animation_dependencies(datablock):
def resolve_animation_dependencies(datablock):
if has_action(datablock):
return datablock.animation_data.action
return [datablock.animation_data.action]
else:
return []
class BlAction(ReplicatedDatablock):

View File

@ -27,7 +27,7 @@ from replication.protocol import ReplicatedDatablock
from .bl_datablock import get_datablock_from_uuid, stamp_uuid
from .bl_action import (load_animation_data,
dump_animation_data,
get_animation_dependencies)
resolve_animation_dependencies)
from ..preferences import get_preferences
from .dump_anything import (
@ -589,7 +589,7 @@ class BlObject(ReplicatedDatablock):
# TODO: uuid based
deps.append(datablock.instance_collection)
deps.append(get_animation_dependencies(datablock))
deps.extend(resolve_animation_dependencies(datablock))
if datablock.modifiers:
deps.extend(find_textures_dependencies(datablock.modifiers))

View File

@ -32,7 +32,7 @@ from .bl_collection import (dump_collection_children, dump_collection_objects,
resolve_collection_dependencies)
from .bl_action import (load_animation_data,
dump_animation_data,
get_animation_dependencies)
resolve_animation_dependencies)
from .bl_datablock import stamp_uuid
from .bl_file import get_filepath

@ -1 +1 @@
Subproject commit ebfe0e9e853cd10e74c4102a59199b9fc150bb31
Subproject commit 7049c7f8fecdb015ece2e2f958f6098e07c3a477