Skip to content

Add in/out Flow attribute to every node and display them in the node header#3048

Merged
cbentejac merged 21 commits into
developfrom
copilot/add-flow-attribute-type
May 26, 2026
Merged

Add in/out Flow attribute to every node and display them in the node header#3048
cbentejac merged 21 commits into
developfrom
copilot/add-flow-attribute-type

Conversation

Copilot AI commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Add the a connection pin in the node's header, to force a flow evaluation, when nodes are not naturally connected by their attributes
Screenshot_2026-05-05_09-42-25

Flow attributes are internal attributes:
Screenshot_2026-05-05_09-44-14

  • Rename FlowAttributeFlow in desc/attribute.py and attribute.py (+ backward-compat alias)
  • Update all imports, isinstance checks, comments, and QML type strings to use "Flow"
  • Move flow input/output attrs from _attributes to _internalAttributes in node.py
  • Update node.py _applyExpr() to also iterate over _internalAttributes
  • Fix attribute.py _applyExpr() to search _internalAttributes when looking for source attr
  • Update QML Node.qml to use internalAttribute()/hasInternalAttribute() for flowIn/flowOut
  • Update nodeFactory.py compatibility checks to account for flow attrs in internalInputs
  • Remove if v is not None filter from outputs in toDict()
  • Update tests (test_flowAttribute.py, test_compatibility.py, test_pipeline.py)
  • All 257 backend tests pass, CodeQL: 0 alerts

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Add new attribute type named Flow Add FlowAttribute type for no-data node dependency edges Mar 18, 2026
Copilot AI requested a review from fabiencastan March 18, 2026 21:19
@codecov

codecov Bot commented Mar 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.74267% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.39%. Comparing base (3083c91) to head (e41541e).
⚠️ Report is 2 commits behind head on develop.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/core/graph.py 76.47% 4 Missing ⚠️
meshroom/core/nodeFactory.py 87.50% 3 Missing ⚠️
meshroom/core/node.py 92.30% 2 Missing ⚠️
meshroom/core/attribute.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3048      +/-   ##
===========================================
+ Coverage    84.92%   85.39%   +0.47%     
===========================================
  Files           72       73       +1     
  Lines        11055    11403     +348     
===========================================
+ Hits          9388     9738     +350     
+ Misses        1667     1665       -2     

☔ 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.

Copilot AI changed the title Add FlowAttribute type for no-data node dependency edges Add FlowAttribute type and automatic flowIn/flowOut pins on every node Mar 18, 2026
Copilot AI changed the title Add FlowAttribute type and automatic flowIn/flowOut pins on every node Add flowIn/flowOut Flow attribute pins to every node, displayed in the node header Mar 18, 2026
Comment thread tests/test_flowAttribute.py Fixed
@nicolas-lambert-tc nicolas-lambert-tc marked this pull request as ready for review May 5, 2026 07:19
Copilot AI review requested due to automatic review settings May 5, 2026 07:19

Copilot AI 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.

Pull request overview

This PR adds automatic flowIn/flowOut pins to nodes and moves those flow attributes into internalAttributes so they can be shown in the node header while remaining separate from normal data attributes.

Changes:

  • Introduces Flow/FlowAttribute descriptor/runtime classes and auto-injects internal flow input/output attrs on nodes.
  • Updates serialization, expression application, compatibility checks, and UI command lookup to account for internal flow attrs.
  • Updates QML node rendering and backend tests for the new flow-pin behavior.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_pipeline.py Adjusts pipeline test to ignore Flow outputs in attribute iteration.
tests/test_flowAttribute.py Adds coverage for Flow descriptor behavior, linking, and graph serialization.
tests/test_compatibility.py Extends compatibility expectations for internal flow attrs.
meshroom/ui/qml/GraphEditor/Node.qml Moves flow pins into the node header and filters them from regular attribute lists.
meshroom/ui/qml/GraphEditor/AttributePin.qml Adds compact pin mode for header rendering.
meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml Handles Flow attrs as non-data UI elements.
meshroom/ui/commands.py Resolves edge commands against regular or internal attributes.
meshroom/core/nodeFactory.py Updates compatibility/name checks for internal flow serialization.
meshroom/core/node.py Applies expressions to internal attrs and auto-creates internal flow pins.
meshroom/core/desc/node.py Defines internal flow attrs on node descriptors.
meshroom/core/desc/attribute.py Adds the Flow descriptor class and alias.
meshroom/core/desc/init.py Re-exports Flow and FlowAttribute.
meshroom/core/attribute.py Resolves link expressions against internal attrs and adds runtime Flow.

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

Comment thread meshroom/core/node.py
Comment on lines +1049 to +1050
for attr in self._internalAttributes:
attr._applyExpr()

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.

yes indeed there's a problem here

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.

but deleting these lines is even worse

Comment thread meshroom/core/node.py
Comment on lines +2228 to +2237
existingAttrNames = set(self._attributes.keys())
for attrDesc in self.nodeDesc.internalFlowInputs:
if attrDesc.name not in existingAttrNames:
self._internalAttributes.add(attributeFactory(attrDesc, kwargs.get(attrDesc.name, None),
isOutput=False, node=self))

for attrDesc in self.nodeDesc.internalFlowOutputs:
if attrDesc.name not in existingAttrNames:
self._internalAttributes.add(attributeFactory(attrDesc, kwargs.get(attrDesc.name, None),
isOutput=True, node=self))
Comment thread meshroom/ui/qml/GraphEditor/Node.qml
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from 16ba3f8 to 1f78ac2 Compare May 5, 2026 08:12
Comment thread meshroom/core/desc/attribute.py Outdated
@Alxiice

Alxiice commented May 5, 2026

Copy link
Copy Markdown
Contributor
Peek 2026-05-05 22-35 Here is a gif a bit more detailed to show some functionnalities :
  • the input flow can be connected to multiple outputs
  • here the flow invalidates the node. Note that I finally decided remove it (because this would switch to compatibility mode all nodes in existing pipelines). This is up to discussion but I think it's better for the flow not to invalidate the node.
  • the serialization works well, and the flow is only serialized if not empty

@Alxiice Alxiice self-requested a review May 5, 2026 20:43
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from db3b9b3 to ed9cbc3 Compare May 6, 2026 10:20
@fabiencastan fabiencastan added this to the Meshroom 2026.1.0 milestone May 8, 2026
@fabiencastan fabiencastan added the feature new feature (proposed as PR or issue planned by dev) label May 8, 2026
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from ed9cbc3 to 6d64695 Compare May 11, 2026 10:19
Copilot AI and others added 16 commits May 25, 2026 12:13
…ments

Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
…ibutesFactory

Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
…None from outputs

Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from 4efe223 to c22adc7 Compare May 25, 2026 10:13
@Alxiice Alxiice requested a review from cbentejac May 25, 2026 10:42
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from b7f8269 to fc613d1 Compare May 25, 2026 15:09
Comment on lines +8 to +17
from meshroom.common import (
BaseObject,
ListModel,
JSValue,
Property,
Variant,
VariantList,
strtobool,
deprecated
)
@cbentejac cbentejac changed the title Add flowIn/flowOut Flow attribute pins to every node, displayed in the node header Add flowIn/flowOut Flow attribute to every node and display them in the node header May 26, 2026
@cbentejac cbentejac changed the title Add flowIn/flowOut Flow attribute to every node and display them in the node header Add in/out Flow attribute to every node and display them in the node header May 26, 2026
@cbentejac cbentejac merged commit 445b981 into develop May 26, 2026
7 of 8 checks passed
@cbentejac cbentejac deleted the copilot/add-flow-attribute-type branch May 26, 2026 08:29
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.

6 participants