diff --git a/meshroom/core/graph.py b/meshroom/core/graph.py index 05c511cf..8197602d 100644 --- a/meshroom/core/graph.py +++ b/meshroom/core/graph.py @@ -252,8 +252,8 @@ class Graph(BaseObject): Args: filepath: The path to the Meshroom Graph file to load. """ - self._deserialize(Graph._loadGraphData(filepath)) self._setFilepath(filepath) + self._deserialize(Graph._loadGraphData(filepath)) self._fileDateVersion = os.path.getmtime(filepath) def initFromTemplate(self, filepath: PathLike, publishOutputs: bool = False): @@ -293,7 +293,9 @@ class Graph(BaseObject): Args: graphData: The serialized Graph. """ - self.clear() + self._clearGraphContent() + self.header.clear() + self.header = graphData.get(GraphIO.Keys.Header, {}) fileVersion = Version(self.header.get(GraphIO.Keys.FileVersion, "0.0")) graphContent = self._normalizeGraphContent(graphData, fileVersion) diff --git a/meshroom/core/node.py b/meshroom/core/node.py index d8722de5..dc8fcd22 100644 --- a/meshroom/core/node.py +++ b/meshroom/core/node.py @@ -952,7 +952,7 @@ class BaseNode(BaseObject): def nbParallelizationBlocks(self): return len(self._chunks) - def hasStatus(self, status): + def hasStatus(self, status: Status): if not self._chunks: return (status == Status.INPUT) for chunk in self._chunks: