diff --git a/bin/meshroom_compute b/bin/meshroom_compute index 2cbfe25e8b..99c225a86c 100755 --- a/bin/meshroom_compute +++ b/bin/meshroom_compute @@ -70,9 +70,15 @@ if args.cache: graph.update() if args.node: - # Execute the node node = graph.findNode(args.node) submittedStatuses = [Status.RUNNING] + + if node.isCompatibilityNode: + print(f'{node.name} is in Compatibility Mode and cannot be computed.') + print(f'Compatibility issue: {node.issueDetails}') + sys.exit(1) + + # Execute the node if not args.extern: # If running as "extern", the task is supposed to have the status SUBMITTED. # If not running as "extern", the SUBMITTED status should generate a warning. @@ -106,7 +112,7 @@ if args.node: node.restoreLogger() else: if args.iteration != -1: - print('Error: "--iteration" only make sense when used with "--node".') + print('Error: "--iteration" only makes sense when used with "--node".') sys.exit(-1) toNodes = None if args.toNode: diff --git a/meshroom/core/graph.py b/meshroom/core/graph.py index c5c5d2728c..5ea54e4a0f 100644 --- a/meshroom/core/graph.py +++ b/meshroom/core/graph.py @@ -1665,6 +1665,11 @@ def executeGraph(graph, toNodes=None, forceCompute=False, forceStatus=False): for n, node in enumerate(nodes): try: + # If the node is in compatibility mode, it cannot be computed + if node.isCompatibilityNode: + logging.warning(f"{node.name} is in Compatibility Mode and cannot be computed: {node.issueDetails}.") + continue + node.preprocess() multiChunks = len(node.chunks) > 1 for c, chunk in enumerate(node.chunks): diff --git a/meshroom/core/taskManager.py b/meshroom/core/taskManager.py index c45b4f5eb3..86a19cc79f 100644 --- a/meshroom/core/taskManager.py +++ b/meshroom/core/taskManager.py @@ -41,8 +41,8 @@ def run(self): for nId, node in enumerate(self._manager._nodesToProcess): - # skip already finished/running nodes - if node.isFinishedOrRunning(): + # Skip already finished/running nodes or nodes in compatibility mode + if node.isFinishedOrRunning() or node.isCompatibilityNode: continue # if a node does not exist anymore, node.chunks becomes a PySide property