Skip to content

Commit 6448353

Browse files
committed
[core] Graph: add missing GraphModification
In `initFromTemplate`, ensure that Publish nodes removal are grouped under the same graph modification to trigger updates only once.
1 parent f224afc commit 6448353

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

meshroom/core/graph.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,9 @@ def initFromTemplate(self, filepath: PathLike, publishOutputs: bool = False):
258258
self._deserialize(Graph._loadGraphData(filepath))
259259

260260
if not publishOutputs:
261-
for node in [node for node in self.nodes if node.nodeType == "Publish"]:
262-
self.removeNode(node.name)
261+
with GraphModification(self):
262+
for node in [node for node in self.nodes if node.nodeType == "Publish"]:
263+
self.removeNode(node.name)
263264

264265
@staticmethod
265266
def _loadGraphData(filepath: PathLike) -> dict:

0 commit comments

Comments
 (0)