Create a new node subtype to allow execution directly in Meshroom environment
Author: AlxiiceCreated Jul 13, 2026Updated Jul 15, 2026
Because of this when we launch graph execution, any node based on desc.Node will execute in a subprocess.
On several occasions this isn't necessary, for example for nodes that will do a simple file lookup and don't require a specific environment. There is a workaround which is using desc.CommandLineNode with the processChunk method:
import os
from meshroom.core import desc
class GetFileExt(desc.CommandLineNode):
inputs = [
desc.File(
name="path",
value="",
exposed=True,
),
]
outputs = [
desc.StringParam(
name="extension",
value=None,
),
]
def processChunk(self, chunk):
chunk.node.extension.value = os.path.splitext(chunk.node.path.value)[1]Comparison:
| mode | time |
|---|---|
desc.Node |
4.8s |
desc.CommandLineNode |
0.02s |
Source: alicevision/Meshroom