diff --git a/server_addon/houdini/client/ayon_houdini/plugins/create/create_hda.py b/server_addon/houdini/client/ayon_houdini/plugins/create/create_hda.py index c727fe0b09..e0929e16f7 100644 --- a/server_addon/houdini/client/ayon_houdini/plugins/create/create_hda.py +++ b/server_addon/houdini/client/ayon_houdini/plugins/create/create_hda.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- """Creator plugin for creating publishable Houdini Digital Assets.""" import hou +from assettools import setToolSubmenu + import ayon_api from ayon_core.pipeline import CreatorError from ayon_core.lib import ( @@ -109,10 +111,7 @@ class CreateHDA(plugin.HoudiniCreator): hda_def.setUserInfo(get_ayon_username()) if pre_create_data.get("use_project"): - tool_name = hou.shelves.defaultToolName( - hda_def.nodeTypeCategory().name(), hda_def.nodeTypeName()) - hou.shelves.tool(tool_name).setToolLocations( - ("AYON/{}".format(self.project_name),)) + setToolSubmenu(hda_def, "AYON/{}".format(self.project_name)) return hda_node diff --git a/server_addon/houdini/client/ayon_houdini/plugins/load/load_hda.py b/server_addon/houdini/client/ayon_houdini/plugins/load/load_hda.py index 3ee487f496..85477965cd 100644 --- a/server_addon/houdini/client/ayon_houdini/plugins/load/load_hda.py +++ b/server_addon/houdini/client/ayon_houdini/plugins/load/load_hda.py @@ -62,13 +62,6 @@ class HdaLoader(plugin.HoudiniLoader): hda_node = parent_node.createNode(name, node_name) hda_node.moveToGoodPosition() - # Set TAB Menu location interactively - # This shouldn't be needed if the Tool Location is saved in the HDA. - tool_name = hou.shelves.defaultToolName( - hda_def.nodeTypeCategory().name(), hda_def.nodeTypeName()) - hou.shelves.tool(tool_name).setToolLocations( - ("AYON/{}".format(context["project"]["name"]),)) - # Imprint it manually data = { "schema": "openpype:container-2.0", diff --git a/server_addon/houdini/client/ayon_houdini/plugins/publish/extract_hda.py b/server_addon/houdini/client/ayon_houdini/plugins/publish/extract_hda.py index 0ff7948a88..e4449d11f8 100644 --- a/server_addon/houdini/client/ayon_houdini/plugins/publish/extract_hda.py +++ b/server_addon/houdini/client/ayon_houdini/plugins/publish/extract_hda.py @@ -25,14 +25,6 @@ class ExtractHDA(plugin.HoudiniExtractorPlugin): hda_def.setOptions(hda_options) hda_def.save(hda_def.libraryFilePath(), hda_node, hda_options) - if instance.data["creator_attributes"].get("use_project"): - # Set TAB Menu location interactively - # This shouldn't be needed if the Tool Location is saved in the HDA. - tool_name = hou.shelves.defaultToolName( - hda_def.nodeTypeCategory().name(), hda_def.nodeTypeName()) - hou.shelves.tool(tool_name).setToolLocations( - ("AYON/{}".format(instance.context.data["projectName"]),)) - if "representations" not in instance.data: instance.data["representations"] = []