mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
flame 'ExtractProductResources' uses AYON settings
This commit is contained in:
parent
c3a8c2ac7f
commit
85526b41ad
2 changed files with 12 additions and 26 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import os
|
||||
import re
|
||||
import tempfile
|
||||
from copy import deepcopy
|
||||
|
||||
import pyblish.api
|
||||
|
|
@ -15,12 +14,12 @@ from ayon_core.pipeline.editorial import (
|
|||
import flame
|
||||
|
||||
|
||||
class ExtractSubsetResources(publish.Extractor):
|
||||
class ExtractProductResources(publish.Extractor):
|
||||
"""
|
||||
Extractor for transcoding files from Flame clip
|
||||
"""
|
||||
|
||||
label = "Extract subset resources"
|
||||
label = "Extract product resources"
|
||||
order = pyblish.api.ExtractorOrder
|
||||
families = ["clip"]
|
||||
hosts = ["flame"]
|
||||
|
|
@ -47,7 +46,7 @@ class ExtractSubsetResources(publish.Extractor):
|
|||
hide_ui_on_process = True
|
||||
|
||||
# settings
|
||||
export_presets_mapping = {}
|
||||
export_presets_mapping = []
|
||||
|
||||
def process(self, instance):
|
||||
if not self.keep_original_representation:
|
||||
|
|
@ -146,15 +145,21 @@ class ExtractSubsetResources(publish.Extractor):
|
|||
# append staging dir for later cleanup
|
||||
instance.context.data["cleanupFullPaths"].append(staging_dir)
|
||||
|
||||
export_presets_mapping = {}
|
||||
for preset_mapping in deepcopy(self.export_presets_mapping):
|
||||
name = preset_mapping.pop("name")
|
||||
export_presets_mapping[name] = preset_mapping
|
||||
|
||||
# add default preset type for thumbnail and reviewable video
|
||||
# update them with settings and override in case the same
|
||||
# are found in there
|
||||
_preset_keys = [k.split('_')[0] for k in self.export_presets_mapping]
|
||||
_preset_keys = [k.split('_')[0] for k in export_presets_mapping]
|
||||
export_presets = {
|
||||
k: v for k, v in deepcopy(self.default_presets).items()
|
||||
k: v
|
||||
for k, v in deepcopy(self.default_presets).items()
|
||||
if k not in _preset_keys
|
||||
}
|
||||
export_presets.update(self.export_presets_mapping)
|
||||
export_presets.update(export_presets_mapping)
|
||||
|
||||
if not instance.data.get("versionData"):
|
||||
instance.data["versionData"] = {}
|
||||
|
|
|
|||
|
|
@ -268,25 +268,6 @@ def _convert_flame_project_settings(ayon_settings, output):
|
|||
ayon_flame = ayon_settings["flame"]
|
||||
|
||||
ayon_publish_flame = ayon_flame["publish"]
|
||||
# Plugin 'ExtractSubsetResources' renamed to 'ExtractProductResources'
|
||||
if "ExtractSubsetResources" in ayon_publish_flame:
|
||||
ayon_product_resources = ayon_publish_flame["ExtractSubsetResources"]
|
||||
else:
|
||||
ayon_product_resources = (
|
||||
ayon_publish_flame.pop("ExtractProductResources"))
|
||||
ayon_publish_flame["ExtractSubsetResources"] = ayon_product_resources
|
||||
|
||||
# 'ExtractSubsetResources' changed model of 'export_presets_mapping'
|
||||
# - some keys were moved under 'other_parameters'
|
||||
new_subset_resources = {}
|
||||
for item in ayon_product_resources.pop("export_presets_mapping"):
|
||||
name = item.pop("name")
|
||||
if "other_parameters" in item:
|
||||
other_parameters = item.pop("other_parameters")
|
||||
item.update(other_parameters)
|
||||
new_subset_resources[name] = item
|
||||
|
||||
ayon_product_resources["export_presets_mapping"] = new_subset_resources
|
||||
|
||||
# 'imageio' changed model
|
||||
# - missing subkey 'project' which is in root of 'imageio' model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue