From 92070610d16bf10bb28effe4dae109b965f59e04 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 31 May 2021 11:48:05 +0200 Subject: [PATCH] Lib: fixing collection of roots and task type detection --- openpype/lib/applications.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index c55d876674..0abfc1bd45 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -1433,9 +1433,9 @@ def _get_basic_context_data_for_anatomy(env=None): # get relevant task type from asset doc task_type = None - for task_t, task_n in asset_doc["data"]["tasks"].items(): + for task_n, task_t in asset_doc["data"]["tasks"].items(): if task_name == task_n: - task_type = task_t + task_type = task_t["type"] break assert task_type, ( @@ -1469,7 +1469,7 @@ def get_custom_workfile_template(custom_templates): # get project, asset, task anatomy context data anatomy_context_data = _get_basic_context_data_for_anatomy() # add root dict - anatomy_context_data.update(anatomy.roots()) + anatomy_context_data.update({"root": anatomy.roots}) # get task type for the task in context test_task_type = anatomy_context_data["task"]["type"]