-
Notifications
You must be signed in to change notification settings - Fork 207
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
Inspector : Make handling of downstream overrides consistent #6178
Inspector : Make handling of downstream overrides consistent #6178
Conversation
a4a1107
to
a7c8103
Compare
Would be good to get some feedback on this @murraystevenson. |
Are we good to merge this now that 1.5.3 is out? |
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.
Thanks John! With 1.5.3.0 released now is a good time to merge. While this is a change in behaviour, it is logical and the end result is more consistent and fits better with the previous change from "None" -> "Source".
This change does highlight a couple of interactions where the user is able to make edits to an upstream plug with downstream overrides with little direct feedback of the change they're making to the upstream plug as they're only ever seeing the value of the downstream override - namely InspectorColumn's editing of bools and the LightTool in general. These issues aren't new, just made a little more apparent with this change to "Source" editing, so I'm happy for this to be merged and we can consider those separately along with making our warnings a bit more visible in PlugPopup...
We were already allowing edits in a nominated EditScope even when there was a downstream override that would prevent you from seeing the result. This was communicated in the UI by an orange "overridden" background colour in the inspector cell, and a warning message in the editing popup window. But in "Source" mode we made no such allowance, meaning that you couldn't make an edit at source if it was overridden downstream, and the UI didn't even show you that it was overridden downstream. There was no background colour and a spurious message about the target not being in the history. We now treat "Source" mode the same as EditScope mode, allowing edits at source even when overridden downstream. Along with that the UI now also shows the overridden status in the background colour and shows the appropriate warning when editing. This commit bundles a couple of other things which might ideally have been separate commits, but which arose naturally while figuring out the implementation : - Consolidated some member data into a single `Result::m_editors` struct. This encourages everything to be initialised together, making the data flow a little clearer, and using `std::optional` to make it unambiguous whether we have initialised yet or not. - Adjusted the failure messages when an attempt is made to disabled a non-existent edit. Instead of directing the user to change edit scope and disabled a _different_ edit, we now just explain that there is no edit to disable. Fixes GafferHQ#6172.
a7c8103
to
38a3539
Compare
Thanks Murray - rebased and merged. |
We were already allowing edits in a nominated EditScope even when there was a downstream override that would prevent you from seeing the result. This was communicated in the UI by an orange "overridden" background colour in the inspector cell, and a warning message in the editing popup window. But in "Source" mode we made no such allowance, meaning that you couldn't make an edit at source if it was overridden downstream, and the UI didn't even show you that it was overridden downstream. There was no background colour and a spurious message about the target not being in the history.
We now treat "Source" mode the same as EditScope mode, allowing edits at source even when overridden downstream. Along with that the UI now also shows the overridden status in the background colour and shows the appropriate warning when editing.
@tomc-cinesite, if you have any bandwidth you'd be welcome to take a look at this. Although as I explained just now, I think changes in between the Tom-era EditScopes and the current setup mean that there's a good reason we didn't do this originally, but must do it now.