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

Miscellaneous ContextTracker-related improvements #6058

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

johnhaddon
Copy link
Member

No description provided.

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.

Improvements look good to me. As we discussed offline, I had some initial reservations about the brightness of "context yellow" when used in the Render Pass Editor, but after living with it for a day I've come around to its charms and it does fit well with the Spreadsheet active row indication, etc.

One minor thing that we'll need to update as part of this change is a reference to the Active column indicator as a "green dot" in the renderPassEditorArnold example.

Errors are caused by evaluating nodes with bad input, either in the form of plug values or of context variables. We have always cleared error badges when plugs are dirtied, which takes care of the situation where the user has fixed the input in the form of plug values. But until now we have stuck our head in the sand completely when it comes to errors due to bad contexts.

But now we have the ContextTracker, we can associate errors with tracked contexts, and when the tracked context changes, clear any errors from previous contexts.

Fixes GafferHQ#3820.
While also taking some small steps to making the window scene-agnostic. We no longer manage `scene:path` explicitly in the window, with one immediate benefit being that it doesn't leak a nonsense value into the context given to RenderPassEditor inspectors.

This also fixes updates in the RenderPassEditor for animated properties, which weren't working in 1.4, even before the introduction of ContextTracker.

I'm not entirely happy about passing an `inspectionPath` though. We do need to pass something to provide an inspection context, but it seems weird to pass a path, especially when the majority of the Context now comes from the ContextTracker. I'm wondering if we should instead pass a small dictionary of context overrides (`scene:path` in LightEditor and `renderPass` in RenderPassEditor). But I'm not sure how we'd obtain them. Regardless, this still represents progress.
@johnhaddon
Copy link
Member Author

we'll need to update as part of this change is a reference to the Active column indicator as a "green dot"

Thanks for spotting that - squashed the change into dced4d4. Merging...

@johnhaddon johnhaddon merged commit 53315d0 into GafferHQ:main Sep 26, 2024
4 of 5 checks passed
@johnhaddon johnhaddon deleted the contextTrackerBits branch October 1, 2024 09:02
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.

2 participants