mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Changed template_name_profiles from raw-json to profiles in Settings for IntegrateNew
Originally it was in Settings only as json. Standardized to profile approach. Resulted in slight change in integrate_new.py
This commit is contained in:
parent
ac8a85995e
commit
b0b1e3d632
3 changed files with 52 additions and 9 deletions
|
|
@ -297,7 +297,17 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
else:
|
||||
orig_transfers = list(instance.data['transfers'])
|
||||
|
||||
template_name = self.template_name_from_instance(instance)
|
||||
task_name = io.Session.get("AVALON_TASK")
|
||||
family = self.main_family_from_instance(instance)
|
||||
|
||||
key_values = {"families": family, "tasks": task_name}
|
||||
profile = filter_profiles(self.template_name_profiles, key_values,
|
||||
logger=self.log)
|
||||
if profile:
|
||||
template_name = profile["template_name"]
|
||||
else:
|
||||
# fallback
|
||||
template_name = self.template_name_from_instance(instance)
|
||||
|
||||
published_representations = {}
|
||||
for idx, repre in enumerate(instance.data["representations"]):
|
||||
|
|
|
|||
|
|
@ -116,19 +116,22 @@
|
|||
]
|
||||
},
|
||||
"IntegrateAssetNew": {
|
||||
"template_name_profiles": {
|
||||
"publish": {
|
||||
"template_name_profiles": [
|
||||
{
|
||||
"families": [],
|
||||
"tasks": []
|
||||
"tasks": [],
|
||||
"template_name": "publish"
|
||||
},
|
||||
"render": {
|
||||
{
|
||||
"families": [
|
||||
"review",
|
||||
"render",
|
||||
"prerender"
|
||||
]
|
||||
],
|
||||
"tasks": [],
|
||||
"template_name": "render"
|
||||
}
|
||||
},
|
||||
],
|
||||
"subset_grouping_profiles": [
|
||||
{
|
||||
"families": [],
|
||||
|
|
|
|||
|
|
@ -420,9 +420,39 @@
|
|||
"is_group": true,
|
||||
"children": [
|
||||
{
|
||||
"type": "raw-json",
|
||||
"type": "list",
|
||||
"key": "template_name_profiles",
|
||||
"label": "template_name_profiles"
|
||||
"label": "Template name profiles",
|
||||
"use_label_wrap": true,
|
||||
"object_type": {
|
||||
"type": "dict",
|
||||
"children": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": ""
|
||||
},
|
||||
{
|
||||
"key": "families",
|
||||
"label": "Families",
|
||||
"type": "list",
|
||||
"object_type": "text"
|
||||
},
|
||||
{
|
||||
"key": "tasks",
|
||||
"label": "Task names",
|
||||
"type": "list",
|
||||
"object_type": "text"
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "template_name",
|
||||
"label": "Template name"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "list",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue