From 0ccd1c4e0e67c00e79f90d6b6d37417aabd592eb Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 24 Nov 2021 13:14:59 +0100 Subject: [PATCH] explaining how filter of preset works in comments --- .../plugins/publish/extract_review_data_mov.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/openpype/hosts/nuke/plugins/publish/extract_review_data_mov.py b/openpype/hosts/nuke/plugins/publish/extract_review_data_mov.py index 00159a81bc..37e98c0d35 100644 --- a/openpype/hosts/nuke/plugins/publish/extract_review_data_mov.py +++ b/openpype/hosts/nuke/plugins/publish/extract_review_data_mov.py @@ -53,21 +53,36 @@ class ExtractReviewDataMov(openpype.api.Extractor): f_families = o_data["filter"]["families"] f_task_types = o_data["filter"]["task_types"] + # test if family found in context test_families = any([ + # first if exact family set is mathing + # make sure only interesetion of list is correct bool(set(families).intersection(f_families)), + # and if famiies are set at all + # if not then return True because we want this preset + # to be active if nothig is set bool(not f_families) ]) + # test task types from filter test_task_types = any([ + # check if actual task type is defined in task types + # set in preset's filter bool(task_type in f_task_types), + # and if taskTypes are defined in preset filter + # if not then return True, because we want this filter + # to be active if no taskType is set bool(not f_task_types) ]) + # we need all filters to be positive for this + # preset to be activated test_all = all([ test_families, test_task_types ]) + # if it is not positive then skip this preset if not test_all: continue