Add flowIn/flowOut Flow attribute pins to every node, displayed in the node header#3048
Add flowIn/flowOut Flow attribute pins to every node, displayed in the node header#3048Copilot wants to merge 15 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3048 +/- ##
===========================================
+ Coverage 83.98% 84.30% +0.32%
===========================================
Files 83 84 +1
Lines 10829 11101 +272
===========================================
+ Hits 9095 9359 +264
- Misses 1734 1742 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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/FlowAttributedescriptor/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.
| for attr in self._internalAttributes: | ||
| attr._applyExpr() |
There was a problem hiding this comment.
yes indeed there's a problem here
There was a problem hiding this comment.
but deleting these lines is even worse
| 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)) |
16ba3f8 to
1f78ac2
Compare
db3b9b3 to
ed9cbc3
Compare
ed9cbc3 to
6d64695
Compare
6d64695 to
9872cc0
Compare
Alxiice
left a comment
There was a problem hiding this comment.
There are behaviours that still doesn't work :
- copy node with flow connection -> the connection is somewhat restored but the UI fails to recreate it
- delete/recreate connection : also fails
42983e2 to
30924cf
Compare
Co-authored-by: fabiencastan <[email protected]>
…ments Co-authored-by: fabiencastan <[email protected]>
…ibutesFactory Co-authored-by: fabiencastan <[email protected]>
Co-authored-by: fabiencastan <[email protected]>
Co-authored-by: fabiencastan <[email protected]>
…None from outputs Co-authored-by: fabiencastan <[email protected]>
…to allow flowIn/flowOut connection
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…or serialization and commands
… duplicate, remove edge, etc)
e9e940a to
26e4a54
Compare

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

Flow attributes are internal attributes:

FlowAttribute→Flowin desc/attribute.py and attribute.py (+ backward-compat alias)"Flow"_attributesto_internalAttributesin node.pynode.py_applyExpr()to also iterate over_internalAttributesattribute.py_applyExpr()to search_internalAttributeswhen looking for source attrNode.qmlto useinternalAttribute()/hasInternalAttribute()for flowIn/flowOutnodeFactory.pycompatibility checks to account for flow attrs ininternalInputsif v is not Nonefilter fromoutputsintoDict()💬 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.