mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-29 08:56:33 +02:00
[ui] only load nodes in Viewer2D when at least one chunk is finished
This commit is contained in:
parent
c71449535d
commit
b91d0b372e
2 changed files with 9 additions and 1 deletions
|
@ -393,6 +393,9 @@ class NodeChunk(BaseObject):
|
||||||
def isStopped(self):
|
def isStopped(self):
|
||||||
return self._status.status == Status.STOPPED
|
return self._status.status == Status.STOPPED
|
||||||
|
|
||||||
|
def isFinished(self):
|
||||||
|
return self._status.status == Status.SUCCESS
|
||||||
|
|
||||||
def process(self, forceCompute=False):
|
def process(self, forceCompute=False):
|
||||||
if not forceCompute and self._status.status == Status.SUCCESS:
|
if not forceCompute and self._status.status == Status.SUCCESS:
|
||||||
logging.info("Node chunk already computed: {}".format(self.name))
|
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 True if all chunks of this Node is either finished or running, False otherwise. """
|
||||||
return all(chunk.isFinishedOrRunning() for chunk in self._chunks)
|
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):
|
def alreadySubmittedChunks(self):
|
||||||
return [ch for ch in self._chunks if ch.isAlreadySubmitted()]
|
return [ch for ch in self._chunks if ch.isAlreadySubmitted()]
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ FocusScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
// node must be computed or at least running
|
// node must be computed or at least running
|
||||||
if (!node.isFinishedOrRunning()) {
|
if (!node.isPartiallyFinished()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue