From 945f59e00c490a18ca7e67c4b50d614b83917e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 21 Jul 2022 15:28:36 +0200 Subject: [PATCH] Retrieve file features for templates When a project file is opened as such, its filepath is stored and all its features are retrieved as a consequence. Templates were hard-coded instead of opened as files, so there never was any need to load their features. Now that .mg files can be opened both as projects and pipelines, we need to retrieve the features in both cases, whether the filepath is stored (file opened as project) or not (file opened as template). This can be useful to retrieve the layout contained in the .mg file for the pipeline, for example. --- meshroom/core/graph.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/meshroom/core/graph.py b/meshroom/core/graph.py index 9baf1a59..f143eb51 100644 --- a/meshroom/core/graph.py +++ b/meshroom/core/graph.py @@ -236,8 +236,6 @@ class Graph(BaseObject): @property def fileFeatures(self): """ Get loaded file supported features based on its version. """ - if not self._filepath: - return [] return Graph.IO.getFeaturesForVersion(self.header.get(Graph.IO.Keys.FileVersion, "0.0")) @Slot(str)