Add kOfxParamPropColourManagement for colour-managed RGB/RGBA params (#158)#245
Add kOfxParamPropColourManagement for colour-managed RGB/RGBA params (#158)#245garyo wants to merge 1 commit into
Conversation
cf241a5 to
e34971a
Compare
|
A documentation note was host should save such parameter value(s) in project file in ACES2065-1 so as we increase interoperability between apps, this stays robust. And to be clear if this property is supported, plugin is expected to create default values in ACES2065-1. Of course hard to test right now :) |
|
Thanks for the note, Pierre — added that now (both header and doc). And I note that you can test the colour-conversion lib any time; that's totally standalone, usable by any host or plug-in. |
|
Does it matter how a host stores the value internally? As a host I also need to store the actual color space (and maybe RGB values) to have the color control show up the same. I can understand that if you have some file format to interchange data between different applications that you want to include the ACES value. |
|
It's a reasonable question. I personally think that as long as any export/import goes via the approved space, and the value will be properly back/forward compatible and cut/paste, scripting and things like that work as expected, then nobody will know or care how you actually store it. @revisionfx? |
cc49fa5 to
228fa66
Compare
…158) Implements the agreed spec change from #158: a string-enum property a plug-in sets on an RGB or RGBA parameter to declare the colourspace of the parameter's values (defaults, current value and keyframes): - kOfxParamColourManagementNone - legacy, unmanaged (default) - kOfxParamColourManagementManaged - ACES2065-1 (AP0), scene-linear, unclamped; for processing colours - kOfxParamColourManagementSRGB - sRGB, [0..1]; for display-referred UI colours such as Draw Suite overlays The encoding is fixed at parameter-definition time and needs no OCIO config, so both colour-managed and unmanaged hosts can support it. Defaults to None, so existing plug-ins are unaffected. - include/ofxParam.h: the property and its three values with full @propdef metadata (enum, dim 1), plus ParamsRGB / ParamsRGBA property sets (the colour param types were not previously modelled). - Documentation/sources/Reference/ofxParameter.rst: spec text with the musts/shoulds for hosts and plug-ins. - Examples/Rectangle/rectangle.cpp: declares its solid-fill colour param as Managed, demonstrating the mandatory set-status check. - release-notes.md: noted under 1.5.1. - openfx-cpp/include/openfx/*: regenerated metadata, property sets and typed accessors via scripts/gen-props.py. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
228fa66 to
0be62f9
Compare
Implements the agreed spec change from #158. Companion to #244 (the
contrib/colourconversion library).What
Adds
kOfxParamPropColourManagement, a string-enum parameter property a plug-in sets on an RGB or RGBA parameter to declare the colourspace of the parameter's values — defaults, current value and keyframes alike:kOfxParamColourManagementNone— legacy, unmanaged (the default; existing plug-ins are unaffected).kOfxParamColourManagementManaged— ACES2065-1 (AP0) reference colourspace; scene-linear, not clamped to[0..1]. For colours that participate in image processing (key colour, solid fill, etc.).kOfxParamColourManagementSRGB— sRGB ("web" RGB), clamped to[0..1]. For display-referred UI colours such as Draw Suite overlays; not for processing image pixels.This replaces the earlier boolean
kOfxParamPropColourManagedwith the three-state design the #158 discussion converged on (a managed/scene-linear mode and an sRGB mode for overlay/UI colours). The encoding is fixed at parameter-definition time and is fully specified without an OCIO config, so colour-managed and unmanaged hosts alike can support it.Rules (see the spec text for the full musts/shoulds)
Noneif unsupported), and must supply/interpret all values in the declared space.Changes
include/ofxParam.h: the property and its three values with@propdefmetadata (enum, dim 1), plus newParamsRGB/ParamsRGBAproperty sets (the colour param types were not previously modelled in the metadata system).Documentation/sources/Reference/ofxParameter.rst: spec text in the Colour Parameters section.Examples/Rectangle/rectangle.cpp: declares its solid-fill colour param asManaged, demonstrating the mandatory set-status check.release-notes.md: noted under 1.5.1.openfx-cpp/include/openfx/*: regenerated metadata, property sets and typed accessors viascripts/gen-props.py.Validation
scripts/gen-props.pypasses all checks and is idempotent.enum/ dimension 1 with the three values consistently across the generated metadata and accessors (ParamsRGB::setColourManagement(...)etc.).🤖 Generated with Claude Code