Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Display nodes computed in another Meshroom instance as "Computed Externally" #1862

Merged
merged 2 commits into from
Jan 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion meshroom/core/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,14 @@ def alreadySubmittedChunks(self):
return [ch for ch in self._chunks if ch.isAlreadySubmitted()]

def isExtern(self):
return self._chunks.at(0).isExtern()
""" Return True if at least one chunk of this Node has an external execution mode, False otherwise.

It is not enough to check whether the first chunk's execution mode is external, because computations
may have been started locally, interrupted, and restarted externally. In that case, if the first
chunk has completed locally before the computations were interrupted, its execution mode will always
be local, even if computations resume externally.
"""
return any(chunk.isExtern() for chunk in self._chunks)

@Slot()
def clearSubmittedChunks(self):
Expand Down Expand Up @@ -1085,6 +1092,7 @@ def canBeCanceled(self):

globalExecModeChanged = Signal()
globalExecMode = Property(str, globalExecMode.fget, notify=globalExecModeChanged)
isExternal = Property(bool, isExtern, notify=globalExecModeChanged)
isComputed = Property(bool, _isComputed, notify=globalStatusChanged)
aliveChanged = Signal()
alive = Property(bool, alive.fget, alive.fset, notify=aliveChanged)
Expand Down
2 changes: 1 addition & 1 deletion meshroom/ui/qml/GraphEditor/Node.qml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Item {

// Submitted externally indicator
MaterialLabel {
visible: ["SUBMITTED", "RUNNING"].includes(node.globalStatus) && node.chunks.count > 0 && node.globalExecMode === "EXTERN"
visible: ["SUBMITTED", "RUNNING"].includes(node.globalStatus) && node.chunks.count > 0 && node.isExternal
text: MaterialIcons.cloud
padding: 2
font.pointSize: 7
Expand Down