mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
ApplicationManager use new tools classes to define it's tools
This commit is contained in:
parent
ed148c7c11
commit
19313b06bd
1 changed files with 9 additions and 7 deletions
|
|
@ -248,6 +248,7 @@ class ApplicationManager:
|
|||
|
||||
self.app_groups = {}
|
||||
self.applications = {}
|
||||
self.tool_groups = {}
|
||||
self.tools = {}
|
||||
|
||||
self.refresh()
|
||||
|
|
@ -256,6 +257,7 @@ class ApplicationManager:
|
|||
"""Refresh applications from settings."""
|
||||
self.app_groups.clear()
|
||||
self.applications.clear()
|
||||
self.tool_groups.clear()
|
||||
self.tools.clear()
|
||||
|
||||
settings = get_system_settings()
|
||||
|
|
@ -270,13 +272,13 @@ class ApplicationManager:
|
|||
|
||||
tools_definitions = settings["tools"]["tool_groups"]
|
||||
for tool_group_name, tool_group_data in tools_definitions.items():
|
||||
tool_variants = tool_group_data.get("variants") or {}
|
||||
for tool_name, tool_data in tool_variants.items():
|
||||
tool = ApplicationTool(tool_name, tool_group_name)
|
||||
if tool.full_name in self.tools:
|
||||
self.log.warning((
|
||||
"Duplicated tool name in settings \"{}\""
|
||||
).format(tool.full_name))
|
||||
if not tool_group_name:
|
||||
continue
|
||||
group = EnvironmentToolGroup(
|
||||
tool_group_name, tool_group_data, self
|
||||
)
|
||||
self.tool_groups[tool_group_name] = group
|
||||
for tool in group:
|
||||
self.tools[tool.full_name] = tool
|
||||
|
||||
def launch(self, app_name, **data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue