mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-04 11:51:58 +02:00
[core][graphIO] Improve node type version handling
* Deserialization: Replace the logic that defaulted the node type version to "0.0" when unspecified, and assume that unspecified version on a node is targetting current node type version. * Serialization: Only serialize node type versions for which a version info is available. * Test suites: * Add helper context manager to manually override the version of a given node type. * Add new unit tests to cover version conflicts handling is various scenarios.
This commit is contained in:
parent
d9e59e330a
commit
87fbcee06d
7 changed files with 98 additions and 9 deletions
|
@ -1608,7 +1608,8 @@ class CompatibilityNode(BaseNode):
|
|||
# Make a deepcopy of nodeDict to handle CompatibilityNode duplication
|
||||
# and be able to change modified inputs (see CompatibilityNode.toDict)
|
||||
self.nodeDict = copy.deepcopy(nodeDict)
|
||||
self.version = Version(self.nodeDict.get("version", None))
|
||||
version = self.nodeDict.get("version")
|
||||
self.version = Version(version) if version else None
|
||||
|
||||
self._inputs = self.nodeDict.get("inputs", {})
|
||||
self._internalInputs = self.nodeDict.get("internalInputs", {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue