mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge pull request #1375 from ynput/enhancement/AY-5627_Extract-review-output-preset-additional-filtering-task-types
Add task_types to ExtractReview profile filtering
This commit is contained in:
commit
45c042cf8d
2 changed files with 12 additions and 0 deletions
|
|
@ -203,15 +203,21 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
||||||
def _get_outputs_for_instance(self, instance):
|
def _get_outputs_for_instance(self, instance):
|
||||||
host_name = instance.context.data["hostName"]
|
host_name = instance.context.data["hostName"]
|
||||||
product_type = instance.data["productType"]
|
product_type = instance.data["productType"]
|
||||||
|
task_type = None
|
||||||
|
task_entity = instance.data.get("taskEntity")
|
||||||
|
if task_entity:
|
||||||
|
task_type = task_entity["taskType"]
|
||||||
|
|
||||||
self.log.debug("Host: \"{}\"".format(host_name))
|
self.log.debug("Host: \"{}\"".format(host_name))
|
||||||
self.log.debug("Product type: \"{}\"".format(product_type))
|
self.log.debug("Product type: \"{}\"".format(product_type))
|
||||||
|
self.log.debug("Task type: \"{}\"".format(task_type))
|
||||||
|
|
||||||
profile = filter_profiles(
|
profile = filter_profiles(
|
||||||
self.profiles,
|
self.profiles,
|
||||||
{
|
{
|
||||||
"hosts": host_name,
|
"hosts": host_name,
|
||||||
"product_types": product_type,
|
"product_types": product_type,
|
||||||
|
"task_types": task_type
|
||||||
},
|
},
|
||||||
logger=self.log)
|
logger=self.log)
|
||||||
if not profile:
|
if not profile:
|
||||||
|
|
|
||||||
|
|
@ -747,6 +747,11 @@ class ExtractReviewProfileModel(BaseSettingsModel):
|
||||||
hosts: list[str] = SettingsField(
|
hosts: list[str] = SettingsField(
|
||||||
default_factory=list, title="Host names"
|
default_factory=list, title="Host names"
|
||||||
)
|
)
|
||||||
|
task_types: list[str] = SettingsField(
|
||||||
|
default_factory=list,
|
||||||
|
title="Task Types",
|
||||||
|
enum_resolver=task_types_enum,
|
||||||
|
)
|
||||||
outputs: list[ExtractReviewOutputDefModel] = SettingsField(
|
outputs: list[ExtractReviewOutputDefModel] = SettingsField(
|
||||||
default_factory=list, title="Output Definitions"
|
default_factory=list, title="Output Definitions"
|
||||||
)
|
)
|
||||||
|
|
@ -1348,6 +1353,7 @@ DEFAULT_PUBLISH_VALUES = {
|
||||||
{
|
{
|
||||||
"product_types": [],
|
"product_types": [],
|
||||||
"hosts": [],
|
"hosts": [],
|
||||||
|
"task_types": [],
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"name": "png",
|
"name": "png",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue