mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +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
|
||||
groups_by_name = {}
|
||||
tool_by_group_name = collections.defaultdict(dict)
|
||||
tools = None
|
||||
if task_entity:
|
||||
# Make sure each tool group can be added only once
|
||||
tools_group_by_entity = task_entity["attrib"].get("tools")
|
||||
if folder_entity and not tools_group_by_entity:
|
||||
tools_group_by_entity = folder_entity["attrib"].get("tools")
|
||||
for key in tools_group_by_entity or []:
|
||||
tools = task_entity["attrib"].get("tools")
|
||||
|
||||
if tools is None and folder_entity:
|
||||
tools = folder_entity["attrib"].get("tools")
|
||||
|
||||
if tools:
|
||||
for key in tools:
|
||||
tool = app.manager.tools.get(key)
|
||||
if not tool or not tool.is_valid_for_app(app):
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue