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

SceneEditor : Add new base class for GafferSceneUI editors #5929

Merged
merged 15 commits into from
Jul 5, 2024

Conversation

johnhaddon
Copy link
Member

This lets us remove all the duplicated (and subtly different) boilerplate for finding the ScenePlugs to view, and fix some bugs along the way.

@johnhaddon johnhaddon self-assigned this Jun 28, 2024
Current thinking is that we don't need a SceneListingWidget and that most of the shared logic should be in PathColumns and Inspectors.
And add `settings()` method to provide access to the settings for all. This standardises the way we store settings for all editors, and removes some annoyances like having to pass a ScriptNode to the Settings constructor.
This was a workaround for the fact that we couldn't perform cancellation when we didn't have an input (because we couldn't find the ScriptNode), but the `Editor.Settings` node now takes care of that for us.
And an unused variable.
Pleasingly, this fixes `Unable to find ScriptNode for UVView` that could occur when we disconnected the UVView's input in `_updateFromSet()`. Now when we're not connected to anything external, we're still connected to `settings()["in"]`, which the BackgroundTask machinery can recover a ScriptNode from.
We use the `exists` plug during the update, so we need to update when it is dirtied.
Copy link
Contributor

@murraystevenson murraystevenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Looks great to me. Nice to see the reduction in boilerplate across the various editors. Especially nice to see the removal of the various references to self.__plug, self.__scenePlug, etc...

@johnhaddon johnhaddon merged commit 3262f2d into GafferHQ:main Jul 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending release
Development

Successfully merging this pull request may close these issues.

None yet

2 participants