mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Move Subset Grouping Profiles settings to Collect Subset Group
- This is moved from the Integrate Asset New settings
This commit is contained in:
parent
7189954a3c
commit
8f8b578f0c
4 changed files with 71 additions and 67 deletions
|
|
@ -24,28 +24,22 @@ class CollectSubsetGroup(pyblish.api.ContextPlugin):
|
|||
order = pyblish.api.CollectorOrder + 0.495
|
||||
label = "Collect Subset Group"
|
||||
|
||||
# Defined in OpenPype settings
|
||||
subset_grouping_profiles = None
|
||||
|
||||
def process(self, instance):
|
||||
"""Look into subset group profiles set by settings.
|
||||
|
||||
Attribute 'subset_grouping_profiles' is defined by OpenPype settings.
|
||||
"""
|
||||
|
||||
# TODO: Move this setting to this Collector instead of Integrator
|
||||
project_settings = instance.context.data["project_settings"]
|
||||
subset_grouping_profiles = (
|
||||
project_settings["global"]
|
||||
["publish"]
|
||||
["IntegrateAssetNew"]
|
||||
["subset_grouping_profiles"]
|
||||
)
|
||||
|
||||
# Skip if 'subset_grouping_profiles' is empty
|
||||
if not subset_grouping_profiles:
|
||||
if not self.subset_grouping_profiles:
|
||||
return
|
||||
|
||||
# Skip if there is no matching profile
|
||||
filter_criteria = self.get_profile_filter_criteria(instance)
|
||||
profile = filter_profiles(subset_grouping_profiles,
|
||||
profile = filter_profiles(self.subset_grouping_profiles,
|
||||
filter_criteria,
|
||||
logger=self.log)
|
||||
if not profile:
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
|
||||
# Attributes set by settings
|
||||
template_name_profiles = None
|
||||
subset_grouping_profiles = None
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,17 @@
|
|||
],
|
||||
"skip_hosts_headless_publish": []
|
||||
},
|
||||
"CollectSubsetGroup": {
|
||||
"subset_grouping_profiles": [
|
||||
{
|
||||
"families": [],
|
||||
"hosts": [],
|
||||
"task_types": [],
|
||||
"tasks": [],
|
||||
"template": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"ValidateEditorialAssetName": {
|
||||
"enabled": true,
|
||||
"optional": false
|
||||
|
|
@ -193,15 +204,6 @@
|
|||
"tasks": [],
|
||||
"template_name": "render"
|
||||
}
|
||||
],
|
||||
"subset_grouping_profiles": [
|
||||
{
|
||||
"families": [],
|
||||
"hosts": [],
|
||||
"task_types": [],
|
||||
"tasks": [],
|
||||
"template": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"CleanUp": {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,61 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
"key": "CollectSubsetGroup",
|
||||
"label": "Collect Subset Group",
|
||||
"is_group": true,
|
||||
"children": [
|
||||
{
|
||||
"type": "list",
|
||||
"key": "subset_grouping_profiles",
|
||||
"label": "Subset grouping profiles",
|
||||
"use_label_wrap": true,
|
||||
"object_type": {
|
||||
"type": "dict",
|
||||
"children": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": "Set all published instances as a part of specific group named according to 'Template'. <br>Implemented all variants of placeholders [{task},{family},{host},{subset},{renderlayer}]"
|
||||
},
|
||||
{
|
||||
"key": "families",
|
||||
"label": "Families",
|
||||
"type": "list",
|
||||
"object_type": "text"
|
||||
},
|
||||
{
|
||||
"type": "hosts-enum",
|
||||
"key": "hosts",
|
||||
"label": "Hosts",
|
||||
"multiselection": true
|
||||
},
|
||||
{
|
||||
"key": "task_types",
|
||||
"label": "Task types",
|
||||
"type": "task-types-enum"
|
||||
},
|
||||
{
|
||||
"key": "tasks",
|
||||
"label": "Task names",
|
||||
"type": "list",
|
||||
"object_type": "text"
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "template",
|
||||
"label": "Template"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
|
|
@ -603,52 +658,6 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "list",
|
||||
"key": "subset_grouping_profiles",
|
||||
"label": "Subset grouping profiles",
|
||||
"use_label_wrap": true,
|
||||
"object_type": {
|
||||
"type": "dict",
|
||||
"children": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": "Set all published instances as a part of specific group named according to 'Template'. <br>Implemented all variants of placeholders [{task},{family},{host},{subset},{renderlayer}]"
|
||||
},
|
||||
{
|
||||
"key": "families",
|
||||
"label": "Families",
|
||||
"type": "list",
|
||||
"object_type": "text"
|
||||
},
|
||||
{
|
||||
"type": "hosts-enum",
|
||||
"key": "hosts",
|
||||
"label": "Hosts",
|
||||
"multiselection": true
|
||||
},
|
||||
{
|
||||
"key": "task_types",
|
||||
"label": "Task types",
|
||||
"type": "task-types-enum"
|
||||
},
|
||||
{
|
||||
"key": "tasks",
|
||||
"label": "Task names",
|
||||
"type": "list",
|
||||
"object_type": "text"
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "template",
|
||||
"label": "Template"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue