Add in/out Flow attribute to every node and display them in the node header#3048
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 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
…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>
…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)
4efe223 to
c22adc7
Compare
b7f8269 to
fc613d1
Compare
… on list attributes
| from meshroom.common import ( | ||
| BaseObject, | ||
| ListModel, | ||
| JSValue, | ||
| Property, | ||
| Variant, | ||
| VariantList, | ||
| strtobool, | ||
| deprecated | ||
| ) |
Flow attribute to every node and display them in the node header

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.