-
Notifications
You must be signed in to change notification settings - Fork 208
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
RenderPassEditor : Render pass creation and deletion #5672
RenderPassEditor : Render pass creation and deletion #5672
Conversation
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.
Nice one, thanks Murray!
Lots of comments inline, but very much of the would-be-nice or what-do-you-think variety...see what you reckon...
Cheers...
John
Maybe this PR gets us to a point where we'd want to add the RenderPassEditor to the default layouts? |
3b7e655
to
16efcc4
Compare
I think it might! Updated the default layouts in 16efcc4. I went with the same panel as the GraphEditor and LightEditor as it felt like you'd want to have access to the HierarchyView, SetEditor and Viewer while the RenderPassEditor is open, though that panel is starting to feel a little overloaded... |
The default widget provides basic validation of render pass names, while the registration allows facilities to provide their own widgets if necessary.
We allow creation of new render passes within an EditScope, but don't provide the ability to edit upstream RenderPasses nodes.
16efcc4
to
d439a60
Compare
We allow deletion of render passes created within the same Edit Scope by removing the names of deleted render passes from the list of names created within that Edit Scope. If a user attempts to delete a render pass that was created in an upstream Edit Scope, we prompt them to either disable those render passes in this Edit Scope or manually switch to the upstream Edit Scope and delete them there. Attempts to delete a render pass that was created in a downstream Edit Scope are met with a dialogue suggesting the deletion should occur downstream but with no option to disable the render passes in order to limit the creation of upstream edits to downstream render passes.
d439a60
to
30a9d84
Compare
Thanks Murray! I've squashed all the fixups into the relevant places and am merging! |
This provides the Render Pass Editor with the ability to create and delete render passes from within a chosen Edit Scope.
We treat deletion as "removing the creation edit", rather than "authoring a deletion edit". This limits deletion to the same Edit Scope that the render pass was created in, but prevents potentially confusing or ambiguous situations such as a downstream Edit Scope containing a long forgotten deletion edit that overrides the deliberate creation of a render pass with the same name in an upstream Edit Scope. In situations where the user attempts to delete a render pass that was created upstream or downstream of the current Edit Scope, we provide dialogues to inform them of the situation and provide the option to instead author an edit to disable the upstream render pass(es) as an alternative to deletion.
This also adds a registerable widget used for editing render pass names. The default widget provides a text widget with basic name validation to limit names to letters, numbers, dashes and underscores, but more advanced or workflow-specific name validation and UI could be provided with a custom widget. This same widget is used when editing the
names
plug of a RenderPasses node, and registering a custom widget for the Render Pass Editor will also make it available for the RenderPasses node.The "Add Render Pass" button behaviour is also customisable via the
addRenderPassButtonMenuSignal()
in the event that facilities wish to add menu items for creating common sets of render passes and the like.In the spirit of #5640, I've added a little swatch to the Add Render Pass dialogue to display the colour of the Edit Scope the user is about to add a render pass to. The intention is to provide a small sanity check useful if people are colouring their Edit Scopes. Longer term, the presentation of the Edit Scope name here would ideally be updated to match whatever we decide for #5640
Test script: renderPassEditScopes.zip