Skip to content
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

Merged

Conversation

murraystevenson
Copy link
Contributor

This provides the Render Pass Editor with the ability to create and delete render passes from within a chosen Edit Scope.

renderPassCreation

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

@murraystevenson murraystevenson self-assigned this Feb 15, 2024
Copy link
Member

@johnhaddon johnhaddon left a 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

@johnhaddon
Copy link
Member

Maybe this PR gets us to a point where we'd want to add the RenderPassEditor to the default layouts?

@murraystevenson murraystevenson force-pushed the renderPassCreation branch 2 times, most recently from 3b7e655 to 16efcc4 Compare February 22, 2024 01:42
@murraystevenson
Copy link
Contributor Author

Maybe this PR gets us to a point where we'd want to add the RenderPassEditor to the default layouts?

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.
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.
@johnhaddon
Copy link
Member

Thanks Murray! I've squashed all the fixups into the relevant places and am merging!

@johnhaddon johnhaddon merged commit 0bcab20 into GafferHQ:1.3_maintenance Feb 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants