Skip to content

Commit

Permalink
Adsk Contrib - Adding the new cg and studio configs (issue #1999) (#2039
Browse files Browse the repository at this point in the history
)

* For issue #1999 adding the new cg and studio configs.
- Added new configs cg-config-v2.2.0_aces-v1.3_ocio-v2.4.ocio and studio-config-v2.2.0_aces-v1.3_ocio-v2.4.ocio
- Made default config cg-config-v2.2.0_aces-v1.3_ocio-v2.4
- Updated the tests accordingly.

TODO: Some documents such as aces_cg.rst and aces_studio.srt need to be updated.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - minor white-space fixes.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* renaming P3 display scene referred aliases:

-- lin_displayp3_scene --> lin_p3d65_scene
-- srgb_displayp3_scene --> srgb_p3d65_scene

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* Make CIE-XYZ Scene-referred inactive

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
  • Loading branch information
cozdas and doug-walker authored Sep 26, 2024
1 parent 79e7b7b commit db6f675
Show file tree
Hide file tree
Showing 12 changed files with 2,453 additions and 40 deletions.
6 changes: 4 additions & 2 deletions include/OpenColorIO/OpenColorIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ extern OCIOEXPORT void SetCurrentConfig(const ConstConfigRcPtr & config);
* "ocio://studio-config-latest" will point to newer versions of those configs. Therefore, it is
* recommended that application developers not save those strings and instead save the string that
* refers to the current version of that config. That way, it's guaranteed that there will be no
* change of behavior in the future. For example, as of OCIO 2.3, "ocio://default" should be saved
* as "ocio://cg-config-v2.1.0_aces-v1.3_ocio-v2.3".
* change of behavior in the future. For example, as of OCIO 2.4, "ocio://default" should be saved
* as "ocio://cg-config-v2.2.0_aces-v1.3_ocio-v2.4".
*
* Note that there is no validation done on the path. That is left to the application since
* typically the application will load the config before attempting to save its path
Expand Down Expand Up @@ -376,10 +376,12 @@ class OCIOEXPORT Config
* ACES Studio config, contains a more complete collection of color spaces and displays:
* "studio-config-v1.0.0_aces-v1.3_ocio-v2.1"
* "studio-config-v2.1.0_aces-v1.3_ocio-v2.3"
* "studio-config-v2.2.0_aces-v1.3_ocio-v2.4"
*
* ACES CG config, basic color spaces for computer graphics apps:
* "cg-config-v1.0.0_aces-v1.3_ocio-v2.1"
* "cg-config-v2.1.0_aces-v1.3_ocio-v2.3"
* "cg-config-v2.2.0_aces-v1.3_ocio-v2.4"
*
* More information is available at:
* %https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES
Expand Down
8 changes: 4 additions & 4 deletions src/OpenColorIO/builtinconfigs/BuiltinConfigRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
static constexpr char OUT_OF_RANGE_EXCEPTION_TEXT[] = "Config index is out of range.";

// TODO: Remove once getDefaultBuiltinConfigName is removed.
static constexpr char DEFAULT_BUILTIN_CONFIG[] = "cg-config-v2.1.0_aces-v1.3_ocio-v2.3";
static constexpr char DEFAULT_BUILTIN_CONFIG[] = "cg-config-v2.2.0_aces-v1.3_ocio-v2.4";

// These are used for ResolveConfigPath function and we need to return a variable that still exists
// once the function finishes since we are returning a const char *.
static constexpr char DEFAULT_BUILTIN_CONFIG_URI[] = "ocio://cg-config-v2.1.0_aces-v1.3_ocio-v2.3";
static constexpr char LATEST_CG_BUILTIN_CONFIG_URI[] = "ocio://cg-config-v2.1.0_aces-v1.3_ocio-v2.3";
static constexpr char LATEST_STUDIO_BUILTIN_CONFIG_URI[] = "ocio://studio-config-v2.1.0_aces-v1.3_ocio-v2.3";
static constexpr char DEFAULT_BUILTIN_CONFIG_URI[] = "ocio://cg-config-v2.2.0_aces-v1.3_ocio-v2.4";
static constexpr char LATEST_CG_BUILTIN_CONFIG_URI[] = "ocio://cg-config-v2.2.0_aces-v1.3_ocio-v2.4";
static constexpr char LATEST_STUDIO_BUILTIN_CONFIG_URI[] = "ocio://studio-config-v2.2.0_aces-v1.3_ocio-v2.4";

static constexpr char BUILTIN_DEFAULT_NAME[] = "default";
static constexpr char BUILTIN_LATEST_CG_NAME[] = "cg-config-latest";
Expand Down
1 change: 1 addition & 0 deletions src/OpenColorIO/builtinconfigs/CG.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@

constexpr char CG_CONFIG_V100_ACES_V13_OCIO_V21[] = { @cg-config-v1.0.0_aces-v1.3_ocio-v2.1@ };
constexpr char CG_CONFIG_V210_ACES_V13_OCIO_V23[] = { @cg-config-v2.1.0_aces-v1.3_ocio-v2.3@ };
constexpr char CG_CONFIG_V220_ACES_V13_OCIO_V24[] = { @cg-config-v2.2.0_aces-v1.3_ocio-v2.4@ };
7 changes: 7 additions & 0 deletions src/OpenColorIO/builtinconfigs/CGConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ void Register(BuiltinConfigRegistryImpl & registry) noexcept
"cg-config-v2.1.0_aces-v1.3_ocio-v2.3",
"Academy Color Encoding System - CG Config [COLORSPACES v2.0.0] [ACES v1.3] [OCIO v2.3]",
CG_CONFIG_V210_ACES_V13_OCIO_V23,
false
);

registry.addBuiltin(
"cg-config-v2.2.0_aces-v1.3_ocio-v2.4",
"Academy Color Encoding System - CG Config [COLORSPACES v2.2.0] [ACES v1.3] [OCIO v2.4]",
CG_CONFIG_V220_ACES_V13_OCIO_V24,
true
);
}
Expand Down
3 changes: 3 additions & 0 deletions src/OpenColorIO/builtinconfigs/Studio.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ constexpr char STUDIO_CONFIG_V210_ACES_V13_OCIO_V23[] = {
@studio-config-v2.1.0_aces-v1.3_ocio-v2.3@
};

constexpr char STUDIO_CONFIG_V220_ACES_V13_OCIO_V24[] = {
@studio-config-v2.2.0_aces-v1.3_ocio-v2.4@
};
7 changes: 7 additions & 0 deletions src/OpenColorIO/builtinconfigs/StudioConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ void Register(BuiltinConfigRegistryImpl & registry) noexcept
"studio-config-v2.1.0_aces-v1.3_ocio-v2.3",
"Academy Color Encoding System - Studio Config [COLORSPACES v2.0.0] [ACES v1.3] [OCIO v2.3]",
STUDIO_CONFIG_V210_ACES_V13_OCIO_V23,
false
);

registry.addBuiltin(
"studio-config-v2.2.0_aces-v1.3_ocio-v2.4",
"Academy Color Encoding System - Studio Config [COLORSPACES v2.2.0] [ACES v1.3] [OCIO v2.4]",
STUDIO_CONFIG_V220_ACES_V13_OCIO_V24,
true
);
}
Expand Down
Loading

0 comments on commit db6f675

Please sign in to comment.