Skip to content

Commit 7beabde

Browse files
Unify transform spreadsheet source
1 parent 97a4718 commit 7beabde

8 files changed

Lines changed: 53 additions & 25 deletions

File tree

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ The following features are available:
4444

4545
- Discovery of *aces-dev* *CTL* transforms.
4646
- Generation of the *CTL* transforms graph.
47-
- `Spreadsheet <https://docs.google.com/spreadsheets/d/1z3xsy3sF0I-8AN_tkMOEjHlAs13ba7VAVhrE8v4WIyo>`__-driven generation.
47+
- `Unified spreadsheet <https://docs.google.com/spreadsheets/d/1V6tbYwPOK8fssOpO91LTUMV_5Lj1ULjadz65r4zxBHw>`__-driven generation.
4848

49-
- Generators producing the *OCIO* **CG** and **Studio** configurations.
50-
- `Spreadsheet <https://docs.google.com/spreadsheets/d/1PXjTzBVYonVFIceGkLDaqcEJvKR6OI63DwZX0aajl3A>`__-driven generation.
49+
- Generators producing the *OCIO* **CG** and **Studio** configurations from
50+
the same unified spreadsheet.
5151

5252
- Included *CLF* transforms along with generator and discovery support.
5353

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ The following features are available:
2626

2727
- Discovery of *aces-dev* *CTL* transforms.
2828
- Generation of the *CTL* transforms graph.
29-
- `Spreadsheet <https://docs.google.com/spreadsheets/d/1z3xsy3sF0I-8AN_tkMOEjHlAs13ba7VAVhrE8v4WIyo>`__-driven generation.
29+
- `Unified spreadsheet <https://docs.google.com/spreadsheets/d/1V6tbYwPOK8fssOpO91LTUMV_5Lj1ULjadz65r4zxBHw>`__-driven generation.
3030

31-
- Generators producing the *OCIO* **CG** and **Studio** configurations.
32-
- `Spreadsheet <https://docs.google.com/spreadsheets/d/1PXjTzBVYonVFIceGkLDaqcEJvKR6OI63DwZX0aajl3A>`__-driven generation.
31+
- Generators producing the *OCIO* **CG** and **Studio** configurations from
32+
the same unified spreadsheet.
3333

3434
- Included *CLF* transforms along with generator and discovery support.
3535

docs/process.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Analytical & Reference Configs Generation
3333
The colour conversion graph is then used to create the *Analytical* config that maps 1-to-1 the **aces-dev** **CTL** transforms to theoretical **OpenColorIO** builtin transforms.
3434
This config does not work but it is useful to test basic generation capabilities whilst diagnosing issues in the mapping.
3535

36-
The *Reference* config is driven by a *CSV* file generated from a `spreadsheet <https://docs.google.com/spreadsheets/d/1z3xsy3sF0I-8AN_tkMOEjHlAs13ba7VAVhrE8v4WIyo>`__ mapping the ``ACEStransformID`` to **OpenColorIO** builtin transforms.
36+
The *Reference* config is driven by a *CSV* file generated from a `unified spreadsheet <https://docs.google.com/spreadsheets/d/1V6tbYwPOK8fssOpO91LTUMV_5Lj1ULjadz65r4zxBHw/edit#gid=273921464>`__ mapping the ``ACEStransformID`` to **OpenColorIO** builtin transforms. The same spreadsheet drives the *CG* and *Studio* configs.
3737

3838
- :func:`opencolorio_config_aces.generate_config_aces`
3939

@@ -52,7 +52,7 @@ The repository contains code to generate, discover and classify the additional *
5252
CG Config Generation
5353
^^^^^^^^^^^^^^^^^^^^
5454

55-
The *CG* config generator also uses a *CSV* file generated from a `spreadsheet <https://docs.google.com/spreadsheets/d/1PXjTzBVYonVFIceGkLDaqcEJvKR6OI63DwZX0aajl3A/edit#gid=365242296>`__ pivot table that expresses which ``ACEStransformID`` should be used from the ``Reference`` config and which ``CLFtransformID`` should be used from the shipped *CLF* transforms.
55+
The *CG* config generator also uses a *CSV* file generated from the unified spreadsheet's `CG Config mapping <https://docs.google.com/spreadsheets/d/1V6tbYwPOK8fssOpO91LTUMV_5Lj1ULjadz65r4zxBHw/edit#gid=863695708>`__ pivot table that expresses which ``ACEStransformID`` should be used from the ``Reference`` config and which ``CLFtransformID`` should be used from the shipped *CLF* transforms.
5656

5757
- :func:`opencolorio_config_aces.generate_config_cg`
5858

@@ -63,7 +63,7 @@ The conversion process is as follows:
6363
Studio Config Generation
6464
^^^^^^^^^^^^^^^^^^^^^^^^
6565

66-
The *Studio* config generator follows the same approach but uses a different `pivot table <https://docs.google.com/spreadsheets/d/1PXjTzBVYonVFIceGkLDaqcEJvKR6OI63DwZX0aajl3A/edit#gid=1155125238>`__ of the spreadsheet.
66+
The *Studio* config generator follows the same approach but uses the unified spreadsheet's `Studio Config mapping <https://docs.google.com/spreadsheets/d/1V6tbYwPOK8fssOpO91LTUMV_5Lj1ULjadz65r4zxBHw/edit#gid=1613109614>`__ pivot table.
6767

6868
- :func:`opencolorio_config_aces.generate_config_studio`
6969

opencolorio_config_aces/config/cg/generate/config.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
generate_config,
4141
named_transform_factory,
4242
)
43+
from opencolorio_config_aces.config.generation.spreadsheet import (
44+
url_export_transforms_mapping_file,
45+
)
4346
from opencolorio_config_aces.config.reference import (
4447
DescriptionStyle,
4548
filter_amf_components,
@@ -89,10 +92,8 @@
8992

9093
LOGGER: logging.Logger = logging.getLogger(__name__)
9194

92-
URL_EXPORT_TRANSFORMS_MAPPING_FILE_CG: str = (
93-
"https://docs.google.com/spreadsheets/d/"
94-
"1PXjTzBVYonVFIceGkLDaqcEJvKR6OI63DwZX0aajl3A/"
95-
"export?format=csv&gid=365242296"
95+
URL_EXPORT_TRANSFORMS_MAPPING_FILE_CG: str = url_export_transforms_mapping_file(
96+
863695708
9697
)
9798
"""
9899
URL to the *ACES* *CTL* transforms to *OpenColorIO* colorspaces mapping file.
@@ -1314,7 +1315,7 @@ def ordering(element: dict[str, Any]) -> int:
13141315
# Virtual Display Shared Views
13151316
# ============================
13161317
data.virtual_display_shared_views = list(
1317-
{
1318+
dict.fromkeys(
13181319
shared_view["view"]
13191320
for shared_view in data.shared_views
13201321
if shared_view["display"]
@@ -1323,7 +1324,7 @@ def ordering(element: dict[str, Any]) -> int:
13231324
for a in data.colorspaces
13241325
if a.get("family") == "Display" and a.get("encoding") == "sdr-video"
13251326
]
1326-
}
1327+
)
13271328
)
13281329

13291330
# Virtual Display Views
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
# Copyright Contributors to the OpenColorIO Project.
3+
"""
4+
OpenColorIO Config Generation Spreadsheet
5+
=========================================
6+
"""
7+
8+
from __future__ import annotations
9+
10+
__all__ = [
11+
"URL_SPREADSHEET_CONFIG_TRANSFORMS",
12+
"url_export_transforms_mapping_file",
13+
]
14+
15+
URL_SPREADSHEET_CONFIG_TRANSFORMS: str = (
16+
"https://docs.google.com/spreadsheets/d/"
17+
"1V6tbYwPOK8fssOpO91LTUMV_5Lj1ULjadz65r4zxBHw"
18+
)
19+
"""URL to the unified *OpenColorIO-Config-ACES* transforms spreadsheet."""
20+
21+
22+
def url_export_transforms_mapping_file(gid: int) -> str:
23+
"""Return the *CSV* export URL for the given mapping sheet identifier."""
24+
25+
return f"{URL_SPREADSHEET_CONFIG_TRANSFORMS}/export?format=csv&gid={gid}"

opencolorio_config_aces/config/reference/generate/config.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
produce_transform,
4242
view_transform_factory,
4343
)
44+
from opencolorio_config_aces.config.generation.spreadsheet import (
45+
url_export_transforms_mapping_file,
46+
)
4447
from opencolorio_config_aces.config.reference import (
4548
classify_aces_ctl_transforms,
4649
discover_aces_ctl_transforms,
@@ -93,10 +96,8 @@
9396

9497
LOGGER: logging.Logger = logging.getLogger(__name__)
9598

96-
URL_EXPORT_TRANSFORMS_MAPPING_FILE_REFERENCE: str = (
97-
"https://docs.google.com/spreadsheets/d/"
98-
"1z3xsy3sF0I-8AN_tkMOEjHlAs13ba7VAVhrE8v4WIyo/"
99-
"export?format=csv&gid=273921464"
99+
URL_EXPORT_TRANSFORMS_MAPPING_FILE_REFERENCE: str = url_export_transforms_mapping_file(
100+
273921464
100101
)
101102
"""
102103
URL to the *ACES* *CTL* transforms to *OpenColorIO* colorspaces mapping file.

opencolorio_config_aces/config/studio/generate/config.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
generate_config,
2828
)
2929
from opencolorio_config_aces.config.generation.common import ConfigData
30+
from opencolorio_config_aces.config.generation.spreadsheet import (
31+
url_export_transforms_mapping_file,
32+
)
3033
from opencolorio_config_aces.config.reference import (
3134
DescriptionStyle,
3235
)
@@ -54,10 +57,8 @@
5457

5558
LOGGER: logging.Logger = logging.getLogger(__name__)
5659

57-
URL_EXPORT_TRANSFORMS_MAPPING_FILE_STUDIO: str = (
58-
"https://docs.google.com/spreadsheets/d/"
59-
"1PXjTzBVYonVFIceGkLDaqcEJvKR6OI63DwZX0aajl3A/"
60-
"export?format=csv&gid=1155125238"
60+
URL_EXPORT_TRANSFORMS_MAPPING_FILE_STUDIO: str = url_export_transforms_mapping_file(
61+
1613109614
6162
)
6263
"""
6364
URL to the *ACES* *CTL* transforms to *OpenColorIO* colorspaces mapping file.

opencolorio_config_aces/utilities/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,11 +653,11 @@ def google_sheet_title(url: str) -> str:
653653
--------
654654
>>> url = (
655655
... "https://docs.google.com/spreadsheets/d/"
656-
... "1z3xsy3sF0I-8AN_tkMOEjHlAs13ba7VAVhrE8v4WIyo/"
656+
... "1V6tbYwPOK8fssOpO91LTUMV_5Lj1ULjadz65r4zxBHw/"
657657
... "export?format=csv&gid=273921464"
658658
... )
659659
>>> google_sheet_title(url) # doctest: +SKIP
660-
'OpenColorIO-Config-ACES "Reference" Transforms - v...'
660+
'OpenColorIO-Config-ACES - Transforms - v4'
661661
"""
662662

663663
class Parser(HTMLParser):

0 commit comments

Comments
 (0)