diff --git a/meshroom/ui/graph.py b/meshroom/ui/graph.py index 4b9659a2..1e3ea9fc 100644 --- a/meshroom/ui/graph.py +++ b/meshroom/ui/graph.py @@ -11,6 +11,7 @@ from meshroom.common.qt import QObjectListModel from meshroom.core.attribute import Attribute, ListAttribute from meshroom.core.graph import Graph, Edge, submitGraph, executeGraph from meshroom.core.node import NodeChunk, Node, Status, CompatibilityNode, Position +from meshroom.core import submitters from meshroom.ui import commands from meshroom.ui.utils import makeProperty @@ -475,6 +476,7 @@ class UIGraph(QObject): computing = Property(bool, isComputing, notify=computeStatusChanged) computingExternally = Property(bool, isComputingExternally, notify=computeStatusChanged) computingLocally = Property(bool, isComputingLocally, notify=computeStatusChanged) + canSubmit = Property(bool, lambda self: len(submitters), constant=True) sortedDFSChunks = Property(QObject, lambda self: self._sortedDFSChunks, constant=True) lockedChanged = Signal() diff --git a/meshroom/ui/qml/main.qml b/meshroom/ui/qml/main.qml index 7da9a10e..1c3fe97b 100755 --- a/meshroom/ui/qml/main.qml +++ b/meshroom/ui/qml/main.qml @@ -358,7 +358,8 @@ ApplicationWindow { && _reconstruction.graph.canComputeLeaves // graph has no uncomputable nodes // evaluate if graph computation can be submitted externally - property bool canSubmit: canStartComputation // can be computed + property bool canSubmit: _reconstruction.canSubmit // current setup allows to compute externally + && canStartComputation // can be computed && _reconstruction.graph.filepath // graph is saved on disk // disable controls if graph is executed externally @@ -381,6 +382,7 @@ ApplicationWindow { } Item { width: 20; height: 1 } Button { + visible: _reconstruction.canSubmit enabled: parent.canSubmit text: "Submit" onClicked: _reconstruction.submit(null)