diff --git a/meshroom/core/desc/node.py b/meshroom/core/desc/node.py index b80c8f87..6d7195b1 100644 --- a/meshroom/core/desc/node.py +++ b/meshroom/core/desc/node.py @@ -260,8 +260,8 @@ class Node(BaseNode): meshroomComputeCmd += f" --iteration {chunk.range.iteration}" runtimeEnv = chunk.node.nodeDesc.plugin.runtimeEnv - cmdPrefix = chunk.node.nodeDesc.plugin.processEnv.getCommandPrefix() - cmdSuffix = chunk.node.nodeDesc.plugin.processEnv.getCommandSuffix() + cmdPrefix = chunk.node.nodeDesc.plugin.commandPrefix + cmdSuffix = chunk.node.nodeDesc.plugin.commandSuffix self.executeChunkCommandLine(chunk, cmdPrefix + meshroomComputeCmd + cmdSuffix, env=runtimeEnv) @@ -279,8 +279,8 @@ class CommandLineNode(BaseNode): return MrNodeType.COMMANDLINE def buildCommandLine(self, chunk) -> str: - cmdPrefix = chunk.node.nodeDesc.plugin.processEnv.getCommandPrefix() - cmdSuffix = chunk.node.nodeDesc.plugin.processEnv.getCommandSuffix() + cmdPrefix = chunk.node.nodeDesc.plugin.commandPrefix + cmdSuffix = chunk.node.nodeDesc.plugin.commandSuffix if chunk.node.isParallelized and chunk.node.size > 1: cmdSuffix = cmdSuffix + " " + self.commandLineRange.format(**chunk.range.toDict()) diff --git a/meshroom/core/plugins.py b/meshroom/core/plugins.py index 1aed93eb..e3612a01 100644 --- a/meshroom/core/plugins.py +++ b/meshroom/core/plugins.py @@ -395,6 +395,16 @@ class NodePlugin(BaseObject): """ Return the environment dictionary for the runtime. """ return self.processEnv.getEnvDict() + @property + def commandPrefix(self) -> str: + """ Return the command prefix for the NodePlugin's execution. """ + return self.processEnv.getCommandPrefix() + + @property + def commandSuffix(self) -> str: + """ Return the command suffix for the NodePlugin's execution. """ + return self.processEnv.getCommandSuffix() + class NodePluginManager(BaseObject): """