Skip to content

Conversation

@cbentejac
Copy link
Contributor

@cbentejac cbentejac commented Jan 19, 2026

Description

This PR is a replacement for #2574.

It introduces a new "Backdrop" node type to Meshroom's core and UI, allowing users to visually group nodes in the graph editor.

Backdrops are a specific type of node that can be instantiated as any other node type, but have no input or output attributes. They only possess internal attributes, including their size (width and height) as they can be resized. Backdrops can be given custom names, colors, and display any comment that was added by the user (with an adjustable font size).

Visually, backdrops are always placed behind any non-backdrop node they may be overlapping with. Whenever a node is fully contained within a backdrop node, it is automatically "attached" to it: moving the backdrop will move the node as well. Conversely, moving a node that is contained within a backdrop will not move the backdrop. As selecting a backdrop adds the nodes that are contained in it to the selection, two new controls are added when clicking on a backdrop:

  • Ctrl + Clic: only select the nodes contained in the backdrop
  • Alt + Clic: only select the backdrop and not the nodes that are contained in it. This is especially useful to "detach" the backdrop from the nodes it contains and move it on its own or remove it from the graph altogether without removing the other nodes.

backdrops

Features list

  • Add a new core BackdropNode type of node which is non-computable and only has internal attributes.
  • Add a new Backdrop node description to make backdrops instantiable.
  • Add a new Backdrop QML component.

Implementation remarks

Backdrop Node Support:

  • Added a new BackdropNode class in both desc.node and core.node, representing a non-computable node for grouping other nodes visually. The Backdrop node has its own internal attributes and serialization logic. (F2d2396aL336R336, [1] [2]
  • Updated the node factory logic and graph logic to support creating and deserializing Backdrop nodes, including a new getNodeConstructor utility. [1] [2] [3] [4] [5] [6]
  • Extended the MrNodeType enum and related type-handling logic to recognize the new BACKDROP node type. [1] [2] [3] [4] [5] [6]

Node Internal Attributes & Display Properties:

  • Refactored internal node attributes into an InternalAttributesFactory, with attribute sets for basic, invalidation, and resizable (font size, width, height) properties. [1] [2]
  • Added new getter methods and Qt properties to Node for fontSize, nodeWidth, and nodeHeight, enabling UI customization for nodes, especially Backdrop nodes. [1] [2]
  • Updated node type checks and properties to distinguish Backdrop nodes from computable and input nodes, including new isBackdropNode property. [1] [2] [3]

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 73.62637% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.66%. Comparing base (d78b127) to head (7025ce9).
⚠️ Report is 2 commits behind head on develop.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/core/node.py 48.64% 19 Missing ⚠️
meshroom/core/desc/node.py 86.84% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2979      +/-   ##
===========================================
- Coverage    79.80%   79.66%   -0.14%     
===========================================
  Files           64       65       +1     
  Lines         8674     8740      +66     
===========================================
+ Hits          6922     6963      +41     
- Misses        1752     1777      +25     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for backdrop nodes in the graph editor, enabling users to visually group and organize nodes with resizable backdrop containers. It replaces PR #2574.

Changes:

  • Introduces a new BackdropNode type at both the core (Python) and UI (QML) levels
  • Adds resizing functionality for backdrop nodes with drag handles for all four sides
  • Implements automatic child node selection when backdrop nodes are selected or dragged

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
meshroom/ui/qml/GraphEditor/qmldir Registers the new Backdrop.qml component
meshroom/ui/qml/GraphEditor/Backdrop.qml New component implementing the visual representation and interaction logic for backdrop nodes
meshroom/ui/qml/GraphEditor/GraphEditor.qml Updates node instantiation to use Loader pattern supporting both Node and Backdrop components; removes semicolons for consistency
meshroom/ui/qml/GraphEditor/NodeEditor.qml Adds conditional UI handling for backdrop nodes (hides attributes tab, shows only notes/documentation)
meshroom/ui/qml/GraphEditor/Node.qml Adds isBackdropNode property for type checking
meshroom/ui/qml/Controls/DelegateSelectionBox.qml Adds logic to automatically select backdrop children when backdrop is selected
meshroom/ui/graph.py Implements resizeNode and resizeAndMoveNode methods for backdrop manipulation; adds BackdropNode import
meshroom/ui/components/geom2D.py Adds rectRectFullIntersect method for checking if one rectangle fully contains another
meshroom/nodes/general/Backdrop.py Defines the Backdrop node plugin
meshroom/core/nodeFactory.py Adds getNodeConstructor function to select appropriate node class (BackdropNode vs Node)
meshroom/core/node.py Implements BackdropNode class with resizing properties (nodeWidth, nodeHeight, fontSize)
meshroom/core/graph.py Updates node creation to use getNodeConstructor
meshroom/core/desc/node.py Adds BACKDROP MrNodeType, BackdropNode descriptor, and InternalAttributesFactory for managing node internal attributes
meshroom/core/desc/init.py Exports new BackdropNode and InternalAttributesFactory classes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cbentejac cbentejac force-pushed the dev/backdrops branch 2 times, most recently from 2fac1c7 to 78941e3 Compare January 19, 2026 17:16
@cbentejac cbentejac marked this pull request as ready for review January 21, 2026 16:24
cbentejac and others added 18 commits January 21, 2026 17:24
…invalidating attribute

Following the changes regarding the internal inputs, `InputNodes` now
do not have the `invalidation` internal attribute anymore. If their
inputs/outputs are not taken into account in the UID computation, their
UID may not be serialized, which leaves them open to an automatic upgrade
if they ever are in Compatibility Mode.
This allows to distinguish between the regular `Node` constructor,
which was used up until now, and the `BackdropNode` constructor, which
is to be used if the node type is "Backdrop".
- "resizeNode" only updates the internal width and height attributes
- "resizeAndModeNode" updates the internal width and height attributes as
well as the position of the backdrop (if it has been resized from the
top or left sides, its top-left corner has moved so its position has
changed)
cbentejac and others added 5 commits January 21, 2026 17:24
- Remove useless `isBackdropNode` property in Node.qml
- Remove useless `isBackdrop` property in Backdrop.qml
- Use `getItemAt` accessor when relevant
- Fix typos in property names and comments
- Remove semicolons when they are not needed
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.

2 participants