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

Layouts : Improve loading of layouts with unavailable editors #5619

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

johnhaddon
Copy link
Member

This uses proxies for missing modules and editors, so we can load the rest of the layout successfully. The proxy editor appears as a tab in the UI as normal but with an "editor not available" label rather than the usual contents. The proxy can also be resaved into a new layout and then be loaded as the real editor later when that becomes available.

This will allow us to load layouts from Gaffer 1.4 in 1.3, even if they include an ImageInspector or LocalJobs panel. Saving the layout in 1.3 and reloading it in 1.4 will even preserve the new editors.

image

This uses proxies for missing modules and editors, so we can load the rest of the layout successfully. The proxy editor appears as a tab in the UI as normal but with an "editor not available" label rather than the usual contents. The proxy can also be resaved into a new layout and then be loaded as the _real_ editor later when that becomes available.

This will allow us to load layouts from Gaffer 1.4 in 1.3, even if they include an ImageInspector or LocalJobs panel. Saving the layout in 1.3 and reloading it in 1.4 will even preserve the new editors.
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.

Nice one! While a little tricky, this does seem a lot more palatable than the blunt instrument approach of versioning the preferences and its potential proliferation of startup files...

I think the only thing I've spotted that we lose out on here is the 'nodeSet' pinning/following state of an unavailable editor is lost when the layout is resaved in 1.3. But that seems a minor quibble given the solution to broken layouts that this provides.

@johnhaddon johnhaddon merged commit d9d4b79 into GafferHQ:1.3_maintenance Jan 10, 2024
4 checks passed
@johnhaddon johnhaddon deleted the layoutLoading branch March 15, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants