mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
code tweak -Jakub's comment
This commit is contained in:
parent
e669ac7ab2
commit
037edc3722
1 changed files with 8 additions and 5 deletions
|
|
@ -286,12 +286,15 @@ def prepare_app_environments(
|
||||||
# Add tools environments
|
# Add tools environments
|
||||||
groups_by_name = {}
|
groups_by_name = {}
|
||||||
tool_by_group_name = collections.defaultdict(dict)
|
tool_by_group_name = collections.defaultdict(dict)
|
||||||
|
tools = None
|
||||||
if task_entity:
|
if task_entity:
|
||||||
# Make sure each tool group can be added only once
|
tools = task_entity["attrib"].get("tools")
|
||||||
tools_group_by_entity = task_entity["attrib"].get("tools")
|
|
||||||
if folder_entity and not tools_group_by_entity:
|
if tools is None and folder_entity:
|
||||||
tools_group_by_entity = folder_entity["attrib"].get("tools")
|
tools = folder_entity["attrib"].get("tools")
|
||||||
for key in tools_group_by_entity or []:
|
|
||||||
|
if tools:
|
||||||
|
for key in tools:
|
||||||
tool = app.manager.tools.get(key)
|
tool = app.manager.tools.get(key)
|
||||||
if not tool or not tool.is_valid_for_app(app):
|
if not tool or not tool.is_valid_for_app(app):
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue