-
Notifications
You must be signed in to change notification settings - Fork 206
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
Per-script OpenColorIO config, working space and display transform #5354
Conversation
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.
Found a single nitpick with the code.
Definitely not really qualified to evaluate the user experience - I'll try to make sure jedypod gets ahold of some sort of build.
if( auto stringPlug = variable->valuePlug<StringPlug>() ) | ||
{ | ||
OpenColorIOAlgo::addVariable( scriptNode->context(), name, stringPlug->getValue() ); | ||
validVariables.insert( name ); |
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.
Not sure if I'm missing something, but this seems unnecessarily complex ... couldn't we just start by discarding all ocio variables in the context, since all of them are either going to be overwritten, or removed?
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.
We could, but it would lead to a lot of unnecessary Context::changedSignal()
emissions.
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.
Ah, makes sense. Maybe a comment explaining that would be nice - with the way it's implemented, it took me a little bit to convince myself that we would never leave behind some of the previous values.
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.
Added comment in 8a1c7a8.
Thanks for taking a look @jedypod. Your main comments highlight things I'd been unsure about myself, so I welcome the chance to think about them a little more.
Yeah, I was worried about that too. But I also worried that something like The other reason I called it
I did think about that, and this was my reasoning for choosing a display transform :
The second point does bring me to a question though : what is the right default for UI settings? Would it be better to avoid the tone-mapping and wotnot for that? Or is it better to have a one-to-one match with the Viewer by default? Returning to the naming discussion, if we stick with using a display transform, perhaps
Thanks for spotting that, and for the video. I'll take a look, and I'll sort out the |
Added in f5308e7.
It turned out that this wasn't a bug - I had deliberately filtered the menu to only show colorspaces in the
Do you think that should be the default? I was trying to avoid giving folks enough rope to shoot themselves in the foot, but maybe it's too restrictive in practice? |
Now that I understand about the working-space colorspace category, I do think this makes sense as it is. I'm good with this! |
With your explanations I do think it makes sense to use a view transform instead of a colorspace for the UI. I like
I would lean towards defaulting to the default view transform in the selected OCIO config: that is, the first item in the list of Active Views. By default this would give a match between what we see in the viewer and what we see in the UI, but it will still be configurable if a different behavior is desired by the user. |
I did a little more testing, and have a couple more little questions. (Sorry I didn't catch these before). Working Space Label Not UpdatingThe first thing is very minor, and might not be a bug but i figured i would flag it anyway:
gaffer-workingspace_label_not_updating.mp4DisplayTransform BehaviorI noticed that the default state of the DisplayTransform node is to do nothing. I'm not sure if there's a good Gaffery reason for this behavior, so please disregard if so. When creating a new Is there a good reason not to have the default plug values match the default display and view as specified by the OCIO config? And is there a good reason for adding the Just curious about that one! Again here's a screen recording showing the behavior. gaffer-displayTransform_behavior.mp4I'm not totally confident this is in-scope for this specific pull request, so apologies if I got that wrong! |
Well spotted - thanks for catching that. It was a more general problem in our presets widget - fixed in 06fbefc.
I suppose the general philosophy is to give nodes do-nothing defaults if we don't think we can read the user's mind sufficiently to choose a do-something default that's likely to be a better starting point. I'm not sure that really applies here though, so I've done as you suggested in e18eaca.
|
I've relabelled the plug as "UI Display Transform" in the Settings window in 2dcc754. I've actually kept the original name (as used in the API) though, as theoretically the OpenColorIOConfigPlug could be used elsewhere, where the display transform might be used for something else. This also lets us change our mind about the label later without worrying about breaking API compatibility. Hopefully that seems reasonable. |
@danieldresser-ie, I think that's all feedback covered now, so if you could cast your eye over the new commits that would be great. |
All looks fine to me |
This avoid redundant updates.
This will replace the global `GafferUI.DisplayTransform` mechanism.
Also remove `useDisplayTransform` option, because it no longer makes sense - clients can just call `setDisplayTransform( identityDisplayTransform )` instead. There's a change in behaviour here for ColorSwatch, because it used to apply the display transform to the background colour when `useDisplayTransform` was off. We can't really do that any more, because when the display transform is identity, we don't know what it would have been otherwise. Possibly we could see if the parent has a different display transform and use that, but that would be a gigantic guess. In practice, none of this seems to matter, because the places we used it are showing RGB colours without an alpha.
This defers most of the work to the new OpenColorIOConfigPlug and its associated UI file.
This has been completely superceded by `Widget.setDisplayTransform()`.
It didn't make much sense that the rest of the behaviour for `colorSpacePresetNames` was controlled by metadata, but this one was controlled by a function argument. The new metadata also provides more flexibility than the `noneLabel` argument. Also updated the "None" label on ImageWriterUI to "Automatic" to match ImageReaderUI.
This allows the user to configure the working space from the settings on the ScriptNode.
At the same time, fix all PlugValueWidget updates where an auxiliary plug is computed but the primary plug is not.
2dcc754
to
6c5323c
Compare
This implements the majority of the remaining items from #5215. It adds an OpenColorIO tab to the ScriptNode settings, allowing the OCIO config, working space and context to be configured on a per-script basis :
@jedypod, this is probably a good moment for you to check out the latest state of things before it gets locked down into the 1.3 release. Perhaps you could download the build artifact from the CI, or get @danieldresser-ie to furnish you with a test build at IE?