OP-4643 - added explicit enum for transcoding type

As transcoding info (colorspace, display) might be collected from DCC, it must be explicit which should be used.
This commit is contained in:
Petr Kalis 2023-02-22 17:33:20 +01:00
parent 7ecf6fde48
commit 945f1dfe55
3 changed files with 21 additions and 5 deletions

View file

@ -1052,7 +1052,7 @@ def convert_colorspace(
output_path,
config_path,
source_colorspace,
target_colorspace,
target_colorspace=None,
view=None,
display=None,
additional_command_args=None,

View file

@ -118,10 +118,17 @@ class ExtractOIIOTranscode(publish.Extractor):
output_name,
output_extension)
target_colorspace = output_def["colorspace"]
view = output_def["view"] or colorspace_data.get("view")
display = (output_def["display"] or
colorspace_data.get("display"))
transcoding_type = output_def["transcoding_type"]
target_colorspace = view = display = None
if transcoding_type == "colorspace":
target_colorspace = (output_def["colorspace"] or
colorspace_data.get("colorspace"))
else:
view = output_def["view"] or colorspace_data.get("view")
display = (output_def["display"] or
colorspace_data.get("display"))
# both could be already collected by DCC,
# but could be overwritten
if view:

View file

@ -271,6 +271,15 @@
"label": "Extension",
"type": "text"
},
{
"type": "enum",
"key": "transcoding_type",
"label": "Transcoding type",
"enum_items": [
{ "colorspace": "Use Colorspace" },
{ "display": "Use Display&View" }
]
},
{
"key": "colorspace",
"label": "Colorspace",