mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
allow icon path to include template keys
This commit is contained in:
parent
1824670bcc
commit
15aec6db16
1 changed files with 5 additions and 0 deletions
|
|
@ -178,6 +178,11 @@ def get_or_create_tool(tool_definition, shelf, template_data):
|
||||||
log.warning("This path doesn't exist - {}".format(script_path))
|
log.warning("This path doesn't exist - {}".format(script_path))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
icon_path = tool_definition["icon"]
|
||||||
|
if icon_path:
|
||||||
|
icon_path = get_path_using_template_data(icon_path, template_data)
|
||||||
|
tool_definition["icon"] = icon_path
|
||||||
|
|
||||||
existing_tools = shelf.tools()
|
existing_tools = shelf.tools()
|
||||||
existing_tool = next(
|
existing_tool = next(
|
||||||
(tool for tool in existing_tools if tool.label() == tool_label),
|
(tool for tool in existing_tools if tool.label() == tool_label),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue