-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Backdrop Node for Meshroom graph #2574
base: develop
Are you sure you want to change the base?
Conversation
e5b1ba2
to
50d7003
Compare
meshroom/core/desc.py
Outdated
class Backdrop(InputNode): | ||
""" A Backdrop for other nodes. | ||
""" | ||
|
||
# The internal inputs' of Backdrop Node needs a Integer Field to determine the font size for the comment | ||
internalInputs = [ | ||
StringParam( | ||
name="invalidation", | ||
label="Invalidation Message", | ||
description="A message that will invalidate the node's output folder.\n" | ||
"This is useful for development, we can invalidate the output of the node when we modify the code.\n" | ||
"It is displayed in bold font in the invalidation/comment messages tooltip.", | ||
value="", | ||
semantic="multiline", | ||
advanced=True, | ||
uidIgnoreValue="", # If the invalidation string is empty, it does not participate to the node's UID | ||
), | ||
StringParam( | ||
name="comment", | ||
label="Comments", | ||
description="User comments describing this specific node instance.\n" | ||
"It is displayed in regular font in the invalidation/comment messages tooltip.", | ||
value="", | ||
semantic="multiline", | ||
invalidate=False, | ||
), | ||
IntParam( | ||
name="fontSize", | ||
label="Font Size", | ||
description="The Font size for the User Comment on the Backdrop.", | ||
value=12, | ||
range=(6, 100, 1), | ||
), | ||
FloatParam( | ||
name="nodeWidth", | ||
label="Node Width", | ||
description="The Backdrop Node's Width.", | ||
value=600, | ||
range=None, | ||
enabled=False # Hidden always | ||
), | ||
FloatParam( | ||
name="nodeHeight", | ||
label="Node Height", | ||
description="The Backdrop Node's Height.", | ||
value=400, | ||
range=None, | ||
enabled=False # Hidden always | ||
), | ||
ColorParam( | ||
name="color", | ||
label="Color", | ||
description="Custom color for the node (SVG name or hexadecimal code).", | ||
value="", | ||
invalidate=False, | ||
) | ||
] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we totally overwrite the internal inputs instead of using the ones from the parent class and adding "Font Size" to it?
With the current way, there's a lot of duplication and the "Node's Label" internal attribute is lost, which I think is a shame since we may want to name the backdrop itself, and not just use the "Comments" attribute. This would prevent having several backdrops named "Backdrop", "Backdrop2", "Backdrop3", and so on... if we want to name them. Similarly, the "Invalidation Message" is currently preserved although it has no impact anywhere so far.
@@ -135,7 +139,7 @@ Item { | |||
Keys.onPressed: { | |||
if (event.key === Qt.Key_F) { | |||
fit() | |||
} else if (event.key === Qt.Key_Delete) { | |||
} else if (event.key === Qt.Key_Delete || event.key === Qt.Key_Backspace) { // Backspace supports both Windows and MacOS Keyboards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not directly related to this, but when a backdrop contains nodes, is there no way to remove the background only and not the background AND everything it contains? (that's a real question, not necessarily a change request)
50d7003
to
0a4bf9f
Compare
Attribute factory serves as a common place to initialize and group attributes and define an accessor to be able to retrieve the attributes
Backdrop Node serves as a Graphical Node allowing only internal attributes to be listed and can be serialized
Added Backdrop Node descriptor which is a derived Incomputable Node with Resizable Attribute Traits
The Loader allows loading Backdrop Component for backdrop nodes and Standard Node component for other nodes
…nstructor for Node Types
…tem rather than the loader delegate
…m rather than the loader delegate
0a4bf9f
to
e73c4df
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2574 +/- ##
===========================================
- Coverage 69.89% 69.88% -0.02%
===========================================
Files 121 122 +1
Lines 7076 7139 +63
===========================================
+ Hits 4946 4989 +43
- Misses 2130 2150 +20 ☔ View full report in Codecov by Sentry. |
TCSR-1194
Feature Request
Minor Fix