Skip to content
Merged
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
9 changes: 6 additions & 3 deletions meshroom/core/desc/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -263,6 +262,7 @@ def processChunk(self, chunk):


class Node(BaseNode):
pythonExecutable = "python"

def __init__(self):
super(Node, self).__init__()
Expand All @@ -271,15 +271,18 @@ 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}"

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):
Expand Down
Loading