OpenColorIO icon indicating copy to clipboard operation
OpenColorIO copied to clipboard

Provide YAML default mechanism to write fewer values

Open jeremyselan opened this issue 15 years ago • 3 comments

Right now, yaml serialization often spits out all values regardless of whether or not they are 'set'. While this is explicit and easy to understand, it makes for lengthy files. Perhaps in some cases it is more appropriate to omit the value unless a non-default is specified?

jeremyselan avatar Nov 24 '10 20:11 jeremyselan

This issue was discussed during the ACES config working group meeting today. The group agreed that we would prefer that attribute values that are default should not be serialized to the yaml. The ColorSpace bitdepth and allocationvars being common examples. The interpolation value of FileTransforms being another example.

We will make that change as part of the v2 work.

doug-walker avatar Sep 09 '20 01:09 doug-walker

That would be great!

To give an example, if we were to remove default equality_group, is_data, allocation and allocationvars from the current ACES config, it would remove over 1100 lines from 5000, more than a fifth!!!

KelSolaar avatar Sep 09 '20 04:09 KelSolaar

As pointed out in the meeting, the equality_group not being specified could lead to a bunch of No-Ops, so we may need to clean up the behavioural differences between, not specifying the option, specifying the option but it being empty and specifying the option as an empty string, etc.

Will need to consider if this may break backwards compatibility in v1 configs, etc.

KevinJW avatar Sep 09 '20 11:09 KevinJW