Closed KelSolaar closed 7 years ago
@Nick-Shaw is suggesting we add some more arguments to colour.gamma definition:
Is there a case for adding kwargs defining handling of negative input, emulating other implementations? I could imagine four possible options,
negative='error'
(current behaviour)negative='mirror'
(Resolve behaviour)negative='passthrough'
(Nuke behaviour) andnegative='clamp'
passthrough sounds like the wrong name for negative handling, it describes how the function does what it does rather than the result, though I'm not that fussed for such simple behaviour. I'm also not 100% on the parameter name. I do support the general idea though.
Kevin
I didn't spent a lot of time thinking what the parameter or options should be called. I agree they are not great. But I couldn't think of obvious ones. I just wanted to suggest the concept.
@Nick-Shaw, @KevinJW: I was going through the opened issues and saw this one, I can implement it just need to know if you have any fancy names for the options?
Afraid I can't think of anything other than my original suggestions. @KevinJW do you have any thoughts? Particularly on the one where you weren't keen on my suggestions.
error somehow imply that the function will fail which is not the case as it generates nan thus what about using indeterminate or simply nan instead?
passthrough is trickier :)
I have updated colour.gamma_function
definition signature with a new negative_number_handling
argument with the following options:
a
, i.e. The Foundry Nuke behaviour.a
to 0.
@Nick-Shaw is suggesting we add some more arguments to
colour.gamma
definition: