mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
flame: update settings, remove camel case
This commit is contained in:
parent
25b54be872
commit
7dbb46fcbf
3 changed files with 36 additions and 19 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
from pprint import pformat
|
||||
from copy import deepcopy
|
||||
import pyblish.api
|
||||
import openpype.api
|
||||
|
|
@ -35,6 +36,8 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
|||
]
|
||||
}
|
||||
}
|
||||
keep_original_representation = False
|
||||
|
||||
# hide publisher during exporting
|
||||
hide_ui_on_process = True
|
||||
|
||||
|
|
@ -42,8 +45,12 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
|||
export_presets_mapping = {}
|
||||
|
||||
def process(self, instance):
|
||||
# create representation data
|
||||
if "representations" not in instance.data:
|
||||
|
||||
if (
|
||||
self.keep_original_representation
|
||||
and "representations" not in instance.data
|
||||
or not self.keep_original_representation
|
||||
):
|
||||
instance.data["representations"] = []
|
||||
|
||||
frame_start = instance.data["frameStart"]
|
||||
|
|
@ -74,9 +81,9 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
|||
# loop all preset names and
|
||||
for unique_name, preset_config in export_presets.items():
|
||||
kwargs = {}
|
||||
preset_file = preset_config["xmlPresetFile"]
|
||||
preset_dir = preset_config["xmlPresetDir"]
|
||||
repre_tags = preset_config["representationTags"]
|
||||
preset_file = preset_config["xml_preset_file"]
|
||||
preset_dir = preset_config["xml_preset_dir"]
|
||||
repre_tags = preset_config["representation_tags"]
|
||||
|
||||
# validate xml preset file is filled
|
||||
if preset_file == "":
|
||||
|
|
@ -144,7 +151,7 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
|||
representation_data["files"] = files
|
||||
|
||||
# add frame range
|
||||
if preset_config["representationAddRange"]:
|
||||
if preset_config["representation_add_range"]:
|
||||
representation_data.update({
|
||||
"frameStart": frame_start_handle,
|
||||
"frameEnd": (
|
||||
|
|
@ -160,3 +167,6 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
|||
|
||||
self.log.info("Added representation: {}".format(
|
||||
representation_data))
|
||||
|
||||
self.log.debug("All representations: {}".format(
|
||||
pformat(instance.data["representations"])))
|
||||
|
|
|
|||
|
|
@ -3,29 +3,31 @@
|
|||
"CreateShotClip": {
|
||||
"hierarchy": "{folder}/{sequence}",
|
||||
"clipRename": true,
|
||||
"clipName": "{track}{sequence}{shot}",
|
||||
"clipName": "{sequence}{shot}",
|
||||
"segmentIndex": true,
|
||||
"countFrom": 10,
|
||||
"countSteps": 10,
|
||||
"folder": "shots",
|
||||
"episode": "ep01",
|
||||
"sequence": "sq01",
|
||||
"sequence": "a",
|
||||
"track": "{_track_}",
|
||||
"shot": "sh###",
|
||||
"shot": "####",
|
||||
"vSyncOn": false,
|
||||
"workfileFrameStart": 1001,
|
||||
"handleStart": 10,
|
||||
"handleEnd": 10
|
||||
"handleStart": 5,
|
||||
"handleEnd": 5
|
||||
}
|
||||
},
|
||||
"publish": {
|
||||
"ExtractSubsetResources": {
|
||||
"keep_original_representation": false,
|
||||
"export_presets_mapping": {
|
||||
"exr16fpdwaa": {
|
||||
"ext": "exr",
|
||||
"xmlPresetDir": "",
|
||||
"xmlPresetFile": "OpenEXR (16-bit fp DWAA).xml",
|
||||
"representationAddRange": false,
|
||||
"representationTags": []
|
||||
"xml_preset_dir": "",
|
||||
"xml_preset_file": "OpenEXR (16-bit fp DWAA).xml",
|
||||
"representation_add_range": true,
|
||||
"representation_tags": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,6 +133,11 @@
|
|||
"label": "Extract Subset Resources",
|
||||
"is_group": true,
|
||||
"children": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "keep_original_representation",
|
||||
"label": "Publish clip's original media"
|
||||
},
|
||||
{
|
||||
"key": "export_presets_mapping",
|
||||
"label": "Export presets mapping",
|
||||
|
|
@ -147,12 +152,12 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "xmlPresetFile",
|
||||
"key": "xml_preset_file",
|
||||
"label": "XML preset file (with ext)",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "xmlPresetDir",
|
||||
"key": "xml_preset_dir",
|
||||
"label": "XML preset folder (optional)",
|
||||
"type": "text"
|
||||
},
|
||||
|
|
@ -161,12 +166,12 @@
|
|||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "representationAddRange",
|
||||
"key": "representation_add_range",
|
||||
"label": "Add frame range to representation"
|
||||
},
|
||||
{
|
||||
"type": "list",
|
||||
"key": "representationTags",
|
||||
"key": "representation_tags",
|
||||
"label": "Add representation tags",
|
||||
"object_type": {
|
||||
"type": "text",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue