diff --git a/meshroom/core/node.py b/meshroom/core/node.py index 67f1a7df..7693c4a5 100644 --- a/meshroom/core/node.py +++ b/meshroom/core/node.py @@ -788,6 +788,12 @@ class BaseNode(BaseObject): def endSequence(self): pass + def stopComputation(self): + """ Stop the computation of this node. """ + for chunk in self._chunks.values(): + if not chunk.isExtern(): + chunk.stopProcess() + def getGlobalStatus(self): """ Get node global status based on the status of its chunks. diff --git a/meshroom/core/taskManager.py b/meshroom/core/taskManager.py index f38537b4..8063f5f1 100644 --- a/meshroom/core/taskManager.py +++ b/meshroom/core/taskManager.py @@ -56,9 +56,7 @@ class TaskThread(Thread): chunk.process(self.forceCompute) except Exception as e: if chunk.isStopped(): - self._state = State.STOPPED - self._manager._graph.clearSubmittedNodes() - self._manager._nodesToProcess = [] + pass else: logging.error("Error on node computation: {}".format(e)) nodesToRemove, _ = self._manager._graph.nodesFromNode(node)