diff --git a/meshroom/core/desc/node.py b/meshroom/core/desc/node.py index 0484e63c44..6c586952ed 100644 --- a/meshroom/core/desc/node.py +++ b/meshroom/core/desc/node.py @@ -17,7 +17,6 @@ _MESHROOM_ROOT = Path(meshroom.__file__).parent.parent.as_posix() _MESHROOM_COMPUTE = (Path(_MESHROOM_ROOT) / "bin" / "meshroom_compute").as_posix() -_MESHROOM_COMPUTE_EXE = f"python {_MESHROOM_COMPUTE}" class MrNodeType(enum.Enum): @@ -263,6 +262,7 @@ def processChunk(self, chunk): class Node(BaseNode): + pythonExecutable = "python" def __init__(self): super(Node, self).__init__() @@ -271,7 +271,9 @@ def getMrNodeType(self): return MrNodeType.NODE def processChunkInEnvironment(self, chunk): - meshroomComputeCmd = f"{_MESHROOM_COMPUTE_EXE} \"{chunk.node.graph.filepath}\" --node {chunk.node.name} --extern --inCurrentEnv" + meshroomComputeCmd = f"{chunk.node.nodeDesc.pythonExecutable} {_MESHROOM_COMPUTE}" + \ + f" \"{chunk.node.graph.filepath}\" --node {chunk.node.name}" + \ + " --extern --inCurrentEnv" if len(chunk.node.getChunks()) > 1: meshroomComputeCmd += f" --iteration {chunk.range.iteration}" @@ -279,7 +281,8 @@ def processChunkInEnvironment(self, chunk): runtimeEnv = chunk.node.nodeDesc.plugin.runtimeEnv cmdPrefix = chunk.node.nodeDesc.plugin.commandPrefix cmdSuffix = chunk.node.nodeDesc.plugin.commandSuffix - self.executeChunkCommandLine(chunk, cmdPrefix + meshroomComputeCmd + cmdSuffix, env=runtimeEnv) + self.executeChunkCommandLine(chunk, cmdPrefix + meshroomComputeCmd + cmdSuffix, + env=runtimeEnv) class CommandLineNode(BaseNode):