mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-25 15:06:38 +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):
|
||||
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()]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue