From f51bf18a25644e7a3f353853262e8b53a61ec9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Wed, 22 Nov 2023 20:11:51 +0100 Subject: [PATCH] [core] Only update the running chunk to `STOPPED` when stopping computations Chunks of that node that are already in the `SUCCESS` state will not be updated, and those that are `SUBMITTED` but not `RUNNING` will be reset to `NONE`. --- meshroom/core/node.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meshroom/core/node.py b/meshroom/core/node.py index ebc82600d1..da68cf57c2 100644 --- a/meshroom/core/node.py +++ b/meshroom/core/node.py @@ -429,7 +429,11 @@ def process(self, forceCompute=False): self.upgradeStatusTo(Status.SUCCESS) def stopProcess(self): - self.upgradeStatusTo(Status.STOPPED) + if not self.isExtern(): + if self._status.status == Status.RUNNING: + self.upgradeStatusTo(Status.STOPPED) + elif self._status.status == Status.SUBMITTED: + self.upgradeStatusTo(Status.NONE) self.node.nodeDesc.stopProcess(self) def isExtern(self): @@ -942,8 +946,7 @@ def endSequence(self): def stopComputation(self): """ Stop the computation of this node. """ for chunk in self._chunks.values(): - if not chunk.isExtern(): - chunk.stopProcess() + chunk.stopProcess() def getGlobalStatus(self): """