mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
globa: update colorspace data exctractor
This commit is contained in:
parent
d1ec0299a0
commit
39c55f4bda
1 changed files with 12 additions and 4 deletions
|
|
@ -20,14 +20,15 @@ class ExtractColorspaceData(publish.Extractor):
|
|||
representation[data] = {
|
||||
"colorspaceData": {
|
||||
"colorspace": "linear",
|
||||
"configPath": "/path/to/config.ocio"
|
||||
"configPath": "{project[root]}/path/to/config.ocio"
|
||||
"configPathFormated": "/abs/path/to/config.ocio"
|
||||
}
|
||||
}
|
||||
|
||||
TODO:
|
||||
- rootify config path so it can be single path for usecases
|
||||
where windows submit to farm and farm on linux do
|
||||
oiio conversions.
|
||||
- Keep templated config path and format it just before the use with anatomy data and envs.
|
||||
- also check if colorspaceData are already added from host exctractors
|
||||
- colorspace data has to be added before Exctract review for OIIO conversion
|
||||
"""
|
||||
label = "Extract Colorspace data"
|
||||
order = pyblish.api.ExtractorOrder + 0.49
|
||||
|
|
@ -55,18 +56,25 @@ class ExtractColorspaceData(publish.Extractor):
|
|||
for representation in representations:
|
||||
# check extension
|
||||
ext = representation["ext"]
|
||||
self.log.debug("__ ext: `{}`".format(ext))
|
||||
if ext.lower() not in self.allowed_ext:
|
||||
continue
|
||||
|
||||
|
||||
# get one filename
|
||||
filename = representation["files"]
|
||||
if isinstance(filename, list):
|
||||
filename = filename.pop()
|
||||
|
||||
self.log.debug("__ filename: `{}`".format(
|
||||
filename))
|
||||
|
||||
# get matching colorspace from rules
|
||||
colorspace = get_imagio_colorspace_from_filepath(
|
||||
filename, config_path=config_path, file_rules=file_rules
|
||||
)
|
||||
self.log.debug("__ colorspace: `{}`".format(
|
||||
colorspace))
|
||||
|
||||
# infuse data to representation
|
||||
if colorspace:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue