1717
1818_MESHROOM_ROOT = Path (meshroom .__file__ ).parent .parent .as_posix ()
1919_MESHROOM_COMPUTE = (Path (_MESHROOM_ROOT ) / "bin" / "meshroom_compute" ).as_posix ()
20- _MESHROOM_COMPUTE_EXE = f"python { _MESHROOM_COMPUTE } "
2120
2221
2322class MrNodeType (enum .Enum ):
@@ -263,6 +262,7 @@ def processChunk(self, chunk):
263262
264263
265264class Node (BaseNode ):
265+ pythonExecutable = "python"
266266
267267 def __init__ (self ):
268268 super (Node , self ).__init__ ()
@@ -271,15 +271,18 @@ def getMrNodeType(self):
271271 return MrNodeType .NODE
272272
273273 def processChunkInEnvironment (self , chunk ):
274- meshroomComputeCmd = f"{ _MESHROOM_COMPUTE_EXE } \" { chunk .node .graph .filepath } \" --node { chunk .node .name } --extern --inCurrentEnv"
274+ meshroomComputeCmd = f"{ chunk .node .nodeDesc .pythonExecutable } { _MESHROOM_COMPUTE } " + \
275+ f" \" { chunk .node .graph .filepath } \" --node { chunk .node .name } " + \
276+ " --extern --inCurrentEnv"
275277
276278 if len (chunk .node .getChunks ()) > 1 :
277279 meshroomComputeCmd += f" --iteration { chunk .range .iteration } "
278280
279281 runtimeEnv = chunk .node .nodeDesc .plugin .runtimeEnv
280282 cmdPrefix = chunk .node .nodeDesc .plugin .commandPrefix
281283 cmdSuffix = chunk .node .nodeDesc .plugin .commandSuffix
282- self .executeChunkCommandLine (chunk , cmdPrefix + meshroomComputeCmd + cmdSuffix , env = runtimeEnv )
284+ self .executeChunkCommandLine (chunk , cmdPrefix + meshroomComputeCmd + cmdSuffix ,
285+ env = runtimeEnv )
283286
284287
285288class CommandLineNode (BaseNode ):
0 commit comments