Hi folks-
H.P., I also agree with that definition. But - it's also true that if you are converting to or from the 1st colorspace in the config list (aka "Reference" colorspace) we should see the to_reference or from_reference transform (or inverse as-needed) applied alone. More specifically, we don't need to explicitly convert from colorspace A to Reference colorspace, then from Reference colorspace to colorspace B because the conversion from Reference to Reference is a non-op. So the OCIO ColorSpace isn't ignoring the reference colorspace in its conversion (as we can explicitly use it if desired), it's simply skipping the conversion from Reference<>Reference that is implied which seems to be standard OCIO behavior. Nevertheless I agree - it's up to the config author to accuratly define the to_reference and from_reference transforms.
From my view, the relevant issues that crop up are symptoms of inconsistent implementations, esp. where Roles are used for implied conversions in the host application.
For example, I can see that Nuke OCIO CDLTransform uses the "reference" ROLE assignment for converting to/from the "working space" assigned in the OCIO CDLTransform node. This is inconsistent, because for other standard operations Nuke honors the reference colorspace that is implied by the first colorspace in the config file. A Read node transforms colors from the Read node colorspace to the Project Settings working space, as do other standard Nuke nodes with colorspace assignments. Of course, we can set the Project Settings working space to the reference/1st colorspace if we want to, and the conversions still happen as expected.
As for the Roles in the config - some of them are used to populate the color Project Settings assignments for "working space," "log files," etc. when a given config file is first loaded. But when some plugins like OCIO CDLTransform use OCIO Roles in its own way, ignoring the Nuke color Project Settings, things are getting overly complicated.
From the source code comments:
ColorSpace Roles are used so that plugins, in addition to this API can have
abstract ways of asking for common colorspaces, without referring to them
by hardcoded names.
All this considered, I conclude that the "reference" role should always be the "reference" (1st) colorspace in the config list. A few suggestions for improved behavior in the wild:
1. As users, get in the habit of setting the reference role to the 1st colorspace in the list.
2. OCIO sanity checks and ociocheck app should return an error if "reference" role is anything other the 1st colorspace.
3. Maybe - hardcode the "reference" role to the first colorspace in the list when configs are read in. I.e.: don't allow custom assignments. I expect some backlash for this suggestion - please don't rake me over the coals :) This at least enforces the intended usage.
-Chris