Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alicevision/meshroom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Vital <mugulmotion@gmail.com>2022-09-29 12:15:11 +0300
committerFabien Castan <fabcastan@gmail.com>2022-10-19 11:50:18 +0300
commitb91d0b372eebc2fe98c86f585020d599b8df1b05 (patch)
tree3f6e62fbefd4bc5e0f6245864568ebc9023d84d2
parentc71449535d57cd8a9343038f9204f371939d0ad8 (diff)
[ui] only load nodes in Viewer2D when at least one chunk is finished
-rw-r--r--meshroom/core/node.py8
-rw-r--r--meshroom/ui/qml/Viewer/Viewer2D.qml2
2 files changed, 9 insertions, 1 deletions
diff --git a/meshroom/core/node.py b/meshroom/core/node.py
index 372c5384..29df5be3 100644
--- a/meshroom/core/node.py
+++ b/meshroom/core/node.py
@@ -393,6 +393,9 @@ class NodeChunk(BaseObject):
def isStopped(self):
return self._status.status == Status.STOPPED
+ def isFinished(self):
+ return self._status.status == Status.SUCCESS
+
def process(self, forceCompute=False):
if not forceCompute and self._status.status == Status.SUCCESS:
logging.info("Node chunk already computed: {}".format(self.name))
@@ -752,6 +755,11 @@ class BaseNode(BaseObject):
""" Return True if all chunks of this Node is either finished or running, False otherwise. """
return all(chunk.isFinishedOrRunning() for chunk in self._chunks)
+ @Slot(result=bool)
+ def isPartiallyFinished(self):
+ """ Return True is at least one chunk of this Node is finished, False otherwise. """
+ return any(chunk.isFinished() for chunk in self._chunks)
+
def alreadySubmittedChunks(self):
return [ch for ch in self._chunks if ch.isAlreadySubmitted()]
diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml
index a7ca3547..0af53edd 100644
--- a/meshroom/ui/qml/Viewer/Viewer2D.qml
+++ b/meshroom/ui/qml/Viewer/Viewer2D.qml
@@ -161,7 +161,7 @@ FocusScope {
}
// node must be computed or at least running
- if (!node.isFinishedOrRunning()) {
+ if (!node.isPartiallyFinished()) {
return false;
}