Skip to content

Commit cac1ba5

Browse files
Adsk contrib - Update builtin config and add studio builtin config (#1713)
* - Modifying the CG builtin config and updating the code accordingly. I named the config without the RC2 in order to minimize the changes once the stable release in available. Signed-off-by: Cedrik Fuoco <[email protected]> * - Adding Studio config Signed-off-by: Cedrik Fuoco <[email protected]> * - Updated config to stable version - Added some variables for string const Signed-off-by: Cedrik Fuoco <[email protected]> * Fixing a unit test since it was using the previous CG config and the config changed. Signed-off-by: Cédrik Fuoco <[email protected]> Signed-off-by: Cedrik Fuoco <[email protected]> Signed-off-by: Cédrik Fuoco <[email protected]> Signed-off-by: Cédrik Fuoco <[email protected]> Co-authored-by: Doug Walker <[email protected]>
1 parent 4f4e522 commit cac1ba5

17 files changed

+1683
-181
lines changed

include/OpenColorIO/OpenColorIO.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,14 @@ class OCIOEXPORT Config
343343
* \param configName Built-in config name.
344344
*
345345
* The available configNames are:
346-
* "cg-config-v0.1.0_aces-v1.3_ocio-v2.1.1" -- ACES CG config, basic color spaces for computer
347-
* graphics apps. More information about these configs is available at:
346+
*
347+
* ACES Studio config, contains a more complete collection of color spaces and displays:
348+
* "studio-config-v1.0.0_aces-v1.3_ocio-v2.1"
349+
*
350+
* ACES CG config, basic color spaces for computer graphics apps:
351+
* "cg-config-v1.0.0_aces-v1.3_ocio-v2.1"
352+
*
353+
* More information is available at:
348354
* %https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES
349355
*
350356
* Information about the available configs is available from the \ref BuiltinConfigRegistry.

src/OpenColorIO/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ set(SOURCES
1212
BitDepthUtils.cpp
1313
builtinconfigs/BuiltinConfigRegistry.cpp
1414
builtinconfigs/CGConfig.cpp
15+
builtinconfigs/StudioConfig.cpp
1516
Caching.cpp
1617
ColorSpace.cpp
1718
ColorSpaceSet.cpp

src/OpenColorIO/builtinconfigs/BuiltinConfigRegistry.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include "builtinconfigs/BuiltinConfigRegistry.h"
1515
#include "builtinconfigs/CGConfig.h"
16+
#include "builtinconfigs/StudioConfig.h"
1617

1718
#define OUT_OF_RANGE_EXCEPTION_TEXT "Config index is out of range."
1819

@@ -42,9 +43,11 @@ void BuiltinConfigRegistryImpl::init() noexcept
4243
if (m_builtinConfigs.empty())
4344
{
4445
m_builtinConfigs.clear();
46+
4547
CGCONFIG::Register(*this);
48+
STUDIOCONFIG::Register(*this);
4649

47-
this->setDefaultBuiltinConfig("cg-config-v0.1.0_aces-v1.3_ocio-v2.1.1");
50+
this->setDefaultBuiltinConfig("cg-config-v1.0.0_aces-v1.3_ocio-v2.1");
4851
}
4952
}
5053

src/OpenColorIO/builtinconfigs/CG.cpp.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// - CGConfig.cpp for the Built-in config feature.
99
// - BuiltinConfigRegistry_tests.cpp for the unit tests
1010

11-
constexpr char CG_CONFIG_V010_ACES_V130_OCIO_V211[] = { @cg-config-v0.1.0_aces-v1.3_ocio-v2.1.1@ };
11+
constexpr char CG_CONFIG_V100_ACES_V13_OCIO_V21[] = { @cg-config-v1.0.0_aces-v1.3_ocio-v2.1@ };

src/OpenColorIO/builtinconfigs/CGConfig.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ namespace OCIO_NAMESPACE
1515

1616
namespace CGCONFIG
1717
{
18-
// Register CG configs.
1918
void Register(BuiltinConfigRegistryImpl & registry) noexcept
2019
{
2120
registry.addBuiltin(
22-
"cg-config-v0.1.0_aces-v1.3_ocio-v2.1.1",
23-
"Academy Color Encoding System - CG Config [COLORSPACES v0.1.0] [ACES v1.3] [OCIO v2.1.1]",
24-
CG_CONFIG_V010_ACES_V130_OCIO_V211,
21+
"cg-config-v1.0.0_aces-v1.3_ocio-v2.1",
22+
"Academy Color Encoding System - CG Config [COLORSPACES v1.0.0] [ACES v1.3] [OCIO v2.1]",
23+
CG_CONFIG_V100_ACES_V13_OCIO_V21,
2524
true
2625
);
2726
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// SPDX-License-Identifier: BSD-3-Clause
2+
// Copyright Contributors to the OpenColorIO Project.
3+
4+
// The file extension cpp (instead of an header .h) was used here to highlight the fact that
5+
// this file should not be included more then ONCE in OCIO.
6+
7+
constexpr char STUDIO_CONFIG_V100_ACES_V13_OCIO_V21[] = {
8+
@studio-config-v1.0.0_aces-v1.3_ocio-v2.1@
9+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// SPDX-License-Identifier: BSD-3-Clause
2+
// Copyright Contributors to the OpenColorIO Project.
3+
4+
#include <OpenColorIO/OpenColorIO.h>
5+
#include "builtinconfigs/BuiltinConfigRegistry.h"
6+
#include "builtinconfigs/StudioConfig.h"
7+
8+
#include "Studio.cpp"
9+
10+
namespace OCIO_NAMESPACE
11+
{
12+
// Create the built-in configs for all versions of the OCIO Studio config for ACES.
13+
// For backwards compatibility, previous versions are kept in the registry but the
14+
// isRecommended flag should be set to false.
15+
16+
namespace STUDIOCONFIG
17+
{
18+
void Register(BuiltinConfigRegistryImpl & registry) noexcept
19+
{
20+
registry.addBuiltin(
21+
"studio-config-v1.0.0_aces-v1.3_ocio-v2.1",
22+
"Academy Color Encoding System - Studio Config [COLORSPACES v1.0.0] [ACES v1.3] [OCIO v2.1]",
23+
STUDIO_CONFIG_V100_ACES_V13_OCIO_V21,
24+
true
25+
);
26+
}
27+
28+
} // namespace STUDIOCONFIG
29+
} // namespace OCIO_NAMESPACE
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: BSD-3-Clause
2+
// Copyright Contributors to the OpenColorIO Project.
3+
4+
5+
#ifndef INCLUDED_OCIO_STUDIOCONFIG_H
6+
#define INCLUDED_OCIO_STUDIOCONFIG_H
7+
8+
9+
#include <OpenColorIO/OpenColorIO.h>
10+
#include "builtinconfigs/BuiltinConfigRegistry.h"
11+
12+
namespace OCIO_NAMESPACE
13+
{
14+
15+
class BuiltinConfigRegistryImpl;
16+
17+
namespace STUDIOCONFIG
18+
{
19+
void Register(BuiltinConfigRegistryImpl & registry) noexcept;
20+
} // namespace STUDIOCONFIG
21+
22+
} // namespace OCIO_NAMESPACE
23+
24+
#endif // INCLUDED_OCIO_STUDIOCONFIG_H

0 commit comments

Comments
 (0)