mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-04 11:51:58 +02:00
[core][graphIO] PartialSerializer: fix List/GroupAttribute link serialization
Ensure attribute input connection is serialized, even for List/GroupAttributes. Note: while connecting GroupAttributes is not yet supported, this will benefit this type of attribute once it is.
This commit is contained in:
parent
724e7fb387
commit
0594f593f2
2 changed files with 21 additions and 3 deletions
|
@ -200,9 +200,13 @@ class PartialGraphSerializer(GraphSerializer):
|
|||
Serialize `attribute` (recursively for list/groups) and deal with attributes being connected
|
||||
to nodes that are not part of the partial list of nodes to serialize.
|
||||
"""
|
||||
# If the attribute is connected to a node that is not in the list of nodes to serialize,
|
||||
# the link expression should not be serialized.
|
||||
if attribute.isLink and attribute.getLinkParam().node not in self.nodes:
|
||||
linkParam = attribute.getLinkParam()
|
||||
|
||||
if linkParam is not None:
|
||||
# Use standard link serialization if upstream node is part of the serialization.
|
||||
if linkParam.node in self.nodes:
|
||||
return attribute.getExportValue()
|
||||
# Skip link serialization otherwise.
|
||||
# If part of a list, this entry can be discarded.
|
||||
if isinstance(attribute.root, ListAttribute):
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue