Skip to content

Commit 57e9b8e

Browse files
committed
[core] desc.node: Use node's Python executable to call meshroom_compute
If `pythonExecutable` has not been explicitly set in the node's description, then the default `python` will be used. Otherwise, the one set in the description will be used. `_MESHROOM_COMPUTE_EXE` is removed since it is now impossible to determine it outside of the node.
1 parent 7575e43 commit 57e9b8e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

meshroom/core/desc/node.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
from meshroom.core import cgroup
1616

1717
_MESHROOM_ROOT = Path(meshroom.__file__).parent.parent.as_posix()
18-
if getattr(sys, "frozen", False): # When in release package mode, the path to meshroom_compute differs
19-
_MESHROOM_COMPUTE = (Path(_MESHROOM_ROOT).parent / "meshroom_compute").as_posix()
20-
_MESHROOM_COMPUTE_EXE = _MESHROOM_COMPUTE
21-
else:
22-
_MESHROOM_COMPUTE = (Path(_MESHROOM_ROOT) / "bin" / "meshroom_compute").as_posix()
23-
_MESHROOM_COMPUTE_EXE = f"python {_MESHROOM_COMPUTE}"
18+
_MESHROOM_COMPUTE = (Path(_MESHROOM_ROOT) / "bin" / "meshroom_compute").as_posix()
2419

2520

2621
class MrNodeType(enum.Enum):
@@ -261,7 +256,8 @@ def getMrNodeType(self):
261256
return MrNodeType.NODE
262257

263258
def processChunkInEnvironment(self, chunk):
264-
meshroomComputeCmd = f"{_MESHROOM_COMPUTE_EXE} {chunk.node.graph.filepath} --node {chunk.node.name} --extern --inCurrentEnv"
259+
meshroomComputeCmd = f"{chunk.node.nodeDesc.pythonExecutable} {_MESHROOM_COMPUTE}"
260+
meshroomComputeCmd += f" {chunk.node.graph.filepath} --node {chunk.node.name} --extern --inCurrentEnv"
265261

266262
if len(chunk.node.getChunks()) > 1:
267263
meshroomComputeCmd += f" --iteration {chunk.range.iteration}"

0 commit comments

Comments
 (0)