Skip to content

Commit c036023

Browse files
Merge pull request #2932 from alicevision/dev/explicitCompatibilityMsg
[bin] `meshroom_compute`: Print an explicit message when attempting to compute `CompatibilityNodes`
2 parents 73a9715 + 48ff8c4 commit c036023

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

bin/meshroom_compute

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,15 @@ if args.cache:
7070
graph.update()
7171

7272
if args.node:
73-
# Execute the node
7473
node = graph.findNode(args.node)
7574
submittedStatuses = [Status.RUNNING]
75+
76+
if node.isCompatibilityNode:
77+
print(f'{node.name} is in Compatibility Mode and cannot be computed.')
78+
print(f'Compatibility issue: {node.issueDetails}')
79+
sys.exit(1)
80+
81+
# Execute the node
7682
if not args.extern:
7783
# If running as "extern", the task is supposed to have the status SUBMITTED.
7884
# If not running as "extern", the SUBMITTED status should generate a warning.
@@ -106,7 +112,7 @@ if args.node:
106112
node.restoreLogger()
107113
else:
108114
if args.iteration != -1:
109-
print('Error: "--iteration" only make sense when used with "--node".')
115+
print('Error: "--iteration" only makes sense when used with "--node".')
110116
sys.exit(-1)
111117
toNodes = None
112118
if args.toNode:

meshroom/core/graph.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,11 @@ def executeGraph(graph, toNodes=None, forceCompute=False, forceStatus=False):
16651665

16661666
for n, node in enumerate(nodes):
16671667
try:
1668+
# If the node is in compatibility mode, it cannot be computed
1669+
if node.isCompatibilityNode:
1670+
logging.warning(f"{node.name} is in Compatibility Mode and cannot be computed: {node.issueDetails}.")
1671+
continue
1672+
16681673
node.preprocess()
16691674
multiChunks = len(node.chunks) > 1
16701675
for c, chunk in enumerate(node.chunks):

meshroom/core/taskManager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def run(self):
4141

4242
for nId, node in enumerate(self._manager._nodesToProcess):
4343

44-
# skip already finished/running nodes
45-
if node.isFinishedOrRunning():
44+
# Skip already finished/running nodes or nodes in compatibility mode
45+
if node.isFinishedOrRunning() or node.isCompatibilityNode:
4646
continue
4747

4848
# if a node does not exist anymore, node.chunks becomes a PySide property

0 commit comments

Comments
 (0)