-
Notifications
You must be signed in to change notification settings - Fork 206
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
Box plug promotion #171
Merged
Merged
Box plug promotion #171
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widgets inside a highlighted tab would incorrectly display an inherited highlight state. This could be seen when dragging a node into the node editor with either nested tabs or a nested VectorData Widget. Fixed this by making the Widget css more specific (not selecting distant children of highlighted widgets) and overriding VectorDataWidget.setHighlighted to store the highlighted state explicity on the QTableView where it could be picked up easily by the stylesheet.
…lue of a read only plug.
… menus even when non-editable.
This provides a CompoundPlug where users can safely put any custom plugs they want, without fear of name clashes with existing or future standard gaffer plugs.
Promotion takes a plug on a node inside a Box, creates a matching plug on the Box itself, and uses that to drive the input to the internal plug. Box methods are provided to query whether or not can be promoted, whether or not one has been promoted, and to promote one. Once we have UI support for it this will form the basis for users to build macros/gizmos/thingos.
This just displays the plugs and provides a menu for adding a few plug types. Later we'll need to add a dialogue for specifying new plug properties (min/max/flags etc) and for modifying the layout and widgets.
The right click popup menu for plugs contains a "Promote to Box" entry which allows users to promote the plug to the box level.
It can now store arbitrary key/value pairs for nodes and plugs, rather than just descriptions as before.
Removed the default implementation from NodeUI - this is now an abstract base class. Moved implementation to StandardNodeUI and improved it to support organisation of plugs into tabs via Metadata, and to support a header and a simplified (tabless) view.
It would error while trying to apply the summary to a non-existent collapsible title.
- Using a simplified form of StandardNodeUI when embedding the Filter ui inside FilterPlugValueWidget. - Placing filter inside its own tab for FilteredSceneProcessors. - Placing transform inside its own tab for ObjectSource nodes. - Placing Shader name widget with Reload button in the header of the NodeUI. - Allowing any callable that yields a NodeUI instance to be passed to NodeUI.registerNodeUI, rather than just NodeUI subclasses. - Removing user tab from preferences ui. - Improving ordering of StandardNodeUI tabs - Settings tab now always comes first.
This necessitated rejigging the PlugValueWidget._addPopupMenu() code to use a belts-and-braces approach where it handles both right click events and also context menu events.
Formerly they didn't keep their values correctly when being promoted, because CompoundPlug::setFrom() had not been implemented.
This provides a nice standard means of labelling a plug, providing the standard PlugValueWidget popup menu and creating a tooltip from the Metadata. The menu is of particular importance, as it makes the plug promotion capabilities available for color plugs and other compound plug types.
OK. I'll merge as-is and we can address the name changes separately if you want to bring it up again later. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the capability to promote plugs on nodes within Boxes onto the outside of the Box. Hopefully this will provide us with the framework we need for allowing users to build their own "gift boxes" - networks of nodes to be passed on to other users.
Fixes #142.