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:
Jakub Trllo 2025-07-22 11:51:39 +02:00 committed by GitHub
commit 45c042cf8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -203,15 +203,21 @@ class ExtractReview(pyblish.api.InstancePlugin):
def _get_outputs_for_instance(self, instance):
host_name = instance.context.data["hostName"]
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("Product type: \"{}\"".format(product_type))
self.log.debug("Task type: \"{}\"".format(task_type))
profile = filter_profiles(
self.profiles,
{
"hosts": host_name,
"product_types": product_type,
"task_types": task_type
},
logger=self.log)
if not profile:

View file

@ -747,6 +747,11 @@ class ExtractReviewProfileModel(BaseSettingsModel):
hosts: list[str] = SettingsField(
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(
default_factory=list, title="Output Definitions"
)
@ -1348,6 +1353,7 @@ DEFAULT_PUBLISH_VALUES = {
{
"product_types": [],
"hosts": [],
"task_types": [],
"outputs": [
{
"name": "png",