Skip to content

Add API module to provide a simple interface to the Meshroom scene#3128

Draft
Alxiice wants to merge 4 commits into
developfrom
feature/add_external_api
Draft

Add API module to provide a simple interface to the Meshroom scene#3128
Alxiice wants to merge 4 commits into
developfrom
feature/add_external_api

Conversation

@Alxiice

@Alxiice Alxiice commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Add a new api module to offer an easier interface to scene and nodes.

Features

  • core:
    • set the log level
    • initialize (load plugins, nodes, etc)
    • list registered plugins
    • register a plugin
    • unregister a plugin
    • list registered NodePlugins
    • register a NodePlugin
    • unregister a NodePlugin
  • scene:
    • load a graph
    • get nodes inside a graph, possibility to filter on node type
    • get backdrop nodes
    • get node by instance name
    • list nodes inside a backdrop node
    • get nodes attributes

@Alxiice Alxiice self-assigned this Jun 9, 2026
@Alxiice Alxiice added the feature new feature (proposed as PR or issue planned by dev) label Jun 9, 2026
@Alxiice Alxiice added this to the Meshroom 2026.1.0 milestone Jun 9, 2026

@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 introduces a new meshroom.api package to provide a simplified interface for interacting with Meshroom plugins and scenes, along with comprehensive unit tests. The review feedback highlights several key improvement opportunities and potential bugs: a type error in setLoglevel when handling invalid log levels, a type mismatch in getBackdropNodes that could cause incorrect node filtering, unnecessary access to private attributes (_name and _compatibilityNodes), an inefficient O(N) lookup in getNode that can be optimized to O(1), redundant list comprehensions in getNodeAttributes, and unused or duplicate imports in the test file.

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 meshroom/api/core.py
Comment thread meshroom/api/scene.py Outdated
Comment thread meshroom/api/core.py Outdated
Comment thread meshroom/api/scene.py
Comment thread meshroom/api/scene.py Outdated
Comment thread meshroom/api/scene.py
Comment thread tests/test_api.py Outdated
Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
Comment thread tests/test_api.py Fixed
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@Alxiice
Alxiice force-pushed the feature/add_external_api branch 2 times, most recently from cb2577c to 3e29525 Compare June 9, 2026 15:20
@Alxiice Alxiice changed the title core: Add external API to query scene infos Add external API to query scene infos Jun 9, 2026
@Alxiice Alxiice changed the title Add external API to query scene infos Add API module to provide a simple interface to the Meshroom scene Jun 9, 2026
@Alxiice
Alxiice force-pushed the feature/add_external_api branch 2 times, most recently from 0167033 to 94ac39a Compare June 16, 2026 20:42
@Alxiice
Alxiice force-pushed the feature/add_external_api branch 2 times, most recently from 1e060c4 to ca58027 Compare June 24, 2026 13:40

@fabiencastan fabiencastan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Meshroom currently has no notion of public versus private APIs. Adding such a concept would require a larger architectural change and project-wide agreement, which is beyond the scope of this PR.

In its current state, the proposed changes introduce additional complexity and ambiguity without establishing the underlying framework needed to support them. Consequently, this PR will not be merged.

The new features to manipulate scenes should be moved in an existing module.

@Alxiice
Alxiice force-pushed the feature/add_external_api branch 2 times, most recently from 9650eaa to ca5d99e Compare June 26, 2026 15:48
@Alxiice
Alxiice force-pushed the feature/add_external_api branch from ca5d99e to f31ec7e Compare July 1, 2026 08:17
@Alxiice
Alxiice marked this pull request as draft July 3, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature new feature (proposed as PR or issue planned by dev)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants