remove products filter

This commit is contained in:
MustafaJafar 2024-06-10 18:59:00 +03:00
parent c8f10a944c
commit 56c02d58a3
3 changed files with 1 additions and 42 deletions

View file

@ -423,42 +423,6 @@ def keep_background_images_linked(node, old_name):
set_background_images(parent, images)
def get_products_menu_items(node):
"""Return products menu items
It gets a list of available products of the specified product types
within the specified folder path with in the specified project.
Args:
node (hou.OpNode): The HDA node.
Returns:
List[str]: Product options for Products menu.
"""
project_name = node.evalParm("project_name")
folder_path = node.evalParm("folder_path")
representation_name = node.evalParm("representation_name")
folder_entity = ayon_api.get_folder_by_path(project_name,
folder_path,
fields={"id"})
if not folder_entity:
return []
products = ayon_api.get_products(
project_name,
folder_ids=[folder_entity["id"]],
product_types=[representation_name]
)
items = []
for product in products:
items.append(product["name"])
items.append(product["name"])
return(items)
def select_folder_path(node):
"""Show dialog to select folder path.

View file

@ -50,10 +50,6 @@
label "Product"
type string
default { "usdAsset" }
menureplace {
[ "hou.phm().get_products_menu_items(kwargs['node'])" ]
language python
}
parmtag { "script_callback" "hou.phm().on_representation_parms_changed(kwargs['node'])" }
parmtag { "script_callback_language" "python" }
}

View file

@ -4,6 +4,5 @@ from ayon_houdini.api.hda_utils import (
on_representation_id_changed,
on_representation_parms_changed,
setup_flag_changed_callback,
get_available_versions,
get_products_menu_items
get_available_versions
)