- All core parameter types:
IntParam,FloatParam,BoolParam,ChoiceParam,StringParam - The
advanced=Trueattribute (hides parameters under the Advanced section) - The
invalidate=Falseattribute (cosmetic parameters that don't trigger recomputation) - The
semantic="image"attribute on outputs (enables 2D viewer display)
- Completed Tutorial 01 or equivalent understanding of the basic node structure.
desc.File(
name="input",
label="Input Image",
description="Path to the input image file.",
value="",
)A file path selector. In the Meshroom UI, it shows a text field with a file browser button.
desc.IntParam(
name="angle",
label="Rotation Angle",
description="Rotation angle in degrees.",
value=0,
range=(-360, 360, 1), # (min, max, step)
)An integer parameter. Renders as a slider in the UI. The range tuple defines the slider bounds and step size.
desc.FloatParam(
name="scale",
label="Scale Factor",
description="Scale factor applied after rotation.",
value=1.0,
range=(0.1, 3.0, 0.1),
advanced=True, # Hidden under the Advanced section
)A floating-point parameter. Similar to IntParam but with decimal precision. Setting advanced=True hides it under an expandable "Advanced" section — useful for parameters that most users won't need to change. To reveal advanced parameters in the Meshroom UI, right-click on the node's attribute panel and enable the Advanced filter:
desc.BoolParam(
name="flip",
label="Flip Horizontal",
description="If enabled, flips the image horizontally.",
value=False,
)A boolean parameter. Renders as a checkbox.
desc.ChoiceParam(
name="interpolation",
label="Interpolation",
description="Interpolation method for rotation.",
values=["NEAREST", "LINEAR", "CUBIC"],
value="LINEAR",
exclusive=True, # Required on all ChoiceParams
)A dropdown selector. exclusive=True is required on all ChoiceParams in the Meshroom ecosystem — it means only one value can be selected.
desc.StringParam(
name="textOverlay",
label="Text Overlay",
description="Optional text to draw on the image.",
value="",
invalidate=False, # Cosmetic — doesn't trigger recomputation
)A free text input field. Setting invalidate=False means changing this parameter does not mark the node as "needs recomputation". Use this for cosmetic or metadata-only parameters.
HelloParams reads the parameters and applies them using OpenCV:
- Rotation:
cv2.getRotationMatrix2D+cv2.warpAffinewith the user-defined angle and scale. - Flip:
cv2.flip(image, 1)when the boolean is True. - Text overlay:
cv2.putTextwith white text and a black outline for readability.
The interpolation ChoiceParam is mapped to OpenCV constants:
interp_map = {
"NEAREST": cv2.INTER_NEAREST,
"LINEAR": cv2.INTER_LINEAR,
"CUBIC": cv2.INTER_CUBIC,
}A pre-configured project is available: open meshroom/tuto02-hello-params.mg in Meshroom (make sure you have run scripts/setup_projects.sh first). Or set it up manually:
- Add a HelloParams node to your graph.
- Set the Input Image field to the path of your test image.
- Set Rotation Angle to 90.
- Click Compute.
- To view the output in the 2D viewer, double-click on the node or use the dropdown menu at the bottom of the 2D viewer and select Output Image.
- The output should be the image rotated 90 degrees clockwise.
- Try enabling Flip Horizontal, changing Scale Factor, and adding Text Overlay.
HelloParams covers the core parameter types. For more advanced patterns:
- GroupAttribute: Groups related parameters into a collapsible section. Used in mrSegmentation.
- ListAttribute: A list of values (e.g., multiple file paths). Used in nodes that accept variable-length inputs.
enabledlambda on outputs:enabled=lambda node: node.someParam.valueconditionally shows/hides an output. Used when an output only makes sense with certain parameter combinations.
These patterns are documented in the Meshroom source code and in production plugins like mrSegmentation.



