Skip to content

Graph Input/Output nodes and API#3164

Open
Alxiice wants to merge 29 commits into
feature/outputNodefrom
feat/graph_in_out
Open

Graph Input/Output nodes and API#3164
Alxiice wants to merge 29 commits into
feature/outputNodefrom
feat/graph_in_out

Conversation

@Alxiice

@Alxiice Alxiice commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Add GraphInput and GraphOutput nodes.

The meshroom_batch API has been modified:

Fetch the graph input attributes

import meshroom
from meshroom.core.graph import Graph
meshroom.core.initNodes()

g = Graph()
g.load('scene.mg')
attributes = g.findGraphInputAttributes()
# attributes: defaultdict(<class 'list'>, {'myInt': [GraphInput_1], 'inFolder': [GraphInput_1]})
attributeNames = list(attributes.keys())
# attributeNames: ['myInt', 'inFolder']

Set the graph input parameters

A new attribute -gi/--graphInput can be used to set a parameter in the inputs.

meshroom_batch -p scene.mg -gi ATTRNAME=VAL ATTRNAME2=VAL

If multiple GraphInput nodes have the parameter they will all be set to the given value.
This is similar to using --paramOverrides GraphInput:ATTRNAME=VAL.

Set the graph output parameters

A new attribute -go/--graphOutput can be used to set a parameter in the outputs.

meshroom_batch -p scene.mg -go FOLDER

Note

This is a simple redirection to output, this argument is just a way to avoid fetching the GraphOutput nodes names

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.83333% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.81%. Comparing base (86558a8) to head (3aca07b).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/core/graphIO.py 16.66% 10 Missing ⚠️
meshroom/core/graph.py 25.00% 9 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/outputNode    #3164      +/-   ##
======================================================
- Coverage               85.93%   85.81%   -0.13%     
======================================================
  Files                      79       79              
  Lines                   12289    12313      +24     
======================================================
+ Hits                    10561    10566       +5     
- Misses                   1728     1747      +19     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request generalizes input and output node handling in Meshroom by introducing IONode, InputNode, and OutputNode base classes, replacing hardcoded CopyFiles logic, and adding new GraphInput and GraphOutput nodes. Key feedback includes fixing Python syntax errors in type annotations (using colons instead of commas in dictionary types), correcting a serialization logic bug where a break statement prematurely exits a loop, adding defensive checks for empty paths and null values in both Python and QML to prevent runtime errors, and correcting a minor typo in the documentation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread bin/meshroom_batch Outdated
Comment thread meshroom/core/graph.py
Comment thread meshroom/core/graphIO.py Outdated
Comment thread NODE_DEVELOPMENT.md
Comment thread meshroom/nodes/general/CreateFile.py Outdated
Comment thread meshroom/nodes/general/GraphInput.py
Comment thread meshroom/nodes/general/GraphInput.py
Comment thread meshroom/nodes/general/GraphOutput.py
Comment thread meshroom/ui/qml/GraphEditor/Node.qml
@Alxiice
Alxiice changed the base branch from develop to feature/outputNode July 9, 2026 16:00
@Alxiice
Alxiice force-pushed the feat/graph_in_out branch 4 times, most recently from 1ee5a73 to 419c909 Compare July 9, 2026 16:09
@Alxiice
Alxiice force-pushed the feat/graph_in_out branch from 3aca07b to 504e11b Compare July 15, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants