mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
set tab shelf location properly and revert unnecessary logic
This commit is contained in:
parent
0fe6836b3a
commit
17ec19f506
3 changed files with 3 additions and 19 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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"] = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue