mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
'ExtractOIIOTranscode is using AYON settings
This commit is contained in:
parent
33d6f54c2d
commit
7669e8ff2b
2 changed files with 7 additions and 28 deletions
|
|
@ -81,6 +81,7 @@ class ExtractOIIOTranscode(publish.Extractor):
|
|||
if not profile:
|
||||
return
|
||||
|
||||
profile_output_defs = profile["outputs"]
|
||||
new_representations = []
|
||||
repres = instance.data["representations"]
|
||||
for idx, repre in enumerate(list(repres)):
|
||||
|
|
@ -98,7 +99,8 @@ class ExtractOIIOTranscode(publish.Extractor):
|
|||
self.log.warning("Config file doesn't exist, skipping")
|
||||
continue
|
||||
|
||||
for output_name, output_def in profile.get("outputs", {}).items():
|
||||
for output_def in profile_output_defs:
|
||||
output_name = output_def["name"]
|
||||
new_repre = copy.deepcopy(repre)
|
||||
|
||||
original_staging_dir = new_repre["stagingDir"]
|
||||
|
|
@ -318,10 +320,10 @@ class ExtractOIIOTranscode(publish.Extractor):
|
|||
subset = instance.data["subset"]
|
||||
filtering_criteria = {
|
||||
"hosts": host_name,
|
||||
"families": family,
|
||||
"product_types": family,
|
||||
"product_names": subset,
|
||||
"task_names": task_name,
|
||||
"task_types": task_type,
|
||||
"subsets": subset
|
||||
}
|
||||
profile = filter_profiles(self.profiles, filtering_criteria,
|
||||
logger=self.log)
|
||||
|
|
@ -329,8 +331,8 @@ class ExtractOIIOTranscode(publish.Extractor):
|
|||
if not profile:
|
||||
self.log.debug((
|
||||
"Skipped instance. None of profiles in presets are for"
|
||||
" Host: \"{}\" | Families: \"{}\" | Task \"{}\""
|
||||
" | Task type \"{}\" | Subset \"{}\" "
|
||||
" Host: \"{}\" | Product types: \"{}\" | Task \"{}\""
|
||||
" | Task type \"{}\" | Product names: \"{}\" "
|
||||
).format(host_name, family, task_name, task_type, subset))
|
||||
|
||||
return profile
|
||||
|
|
|
|||
|
|
@ -426,29 +426,6 @@ def _convert_global_project_settings(ayon_settings, output, default_settings):
|
|||
ayon_extract_thumbnail["background_color"]
|
||||
)
|
||||
|
||||
# ExtractOIIOTranscode plugin
|
||||
extract_oiio_transcode = ayon_publish["ExtractOIIOTranscode"]
|
||||
extract_oiio_transcode_profiles = extract_oiio_transcode["profiles"]
|
||||
for profile in extract_oiio_transcode_profiles:
|
||||
new_outputs = {}
|
||||
name_counter = {}
|
||||
if "product_names" in profile:
|
||||
profile["subsets"] = profile.pop("product_names")
|
||||
for profile_output in profile["outputs"]:
|
||||
if "name" in profile_output:
|
||||
name = profile_output.pop("name")
|
||||
else:
|
||||
# Backwards compatibility for setting without 'name' in model
|
||||
name = profile_output["extension"]
|
||||
if name in new_outputs:
|
||||
name_counter[name] += 1
|
||||
name = "{}_{}".format(name, name_counter[name])
|
||||
else:
|
||||
name_counter[name] = 0
|
||||
|
||||
new_outputs[name] = profile_output
|
||||
profile["outputs"] = new_outputs
|
||||
|
||||
if "IntegrateProductGroup" in ayon_publish:
|
||||
subset_group = ayon_publish.pop("IntegrateProductGroup")
|
||||
subset_group_profiles = subset_group.pop("product_grouping_profiles")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue