Fix: Redundant submenus are created in the Add menu for certain catalog names

A few of the recently added submenus are not included in the list of builtin
menus, so node assets under those catalog names will generate redundant submenus.
Fixes same issue as b49c84276c for newly added nested menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/122855
This commit is contained in:
noodlebox
2024-06-06 23:39:00 +02:00
committed by Hans Goudey
parent b5022828d6
commit b73b663309
2 changed files with 5 additions and 0 deletions
@@ -577,6 +577,7 @@ class NODE_MT_category_GEO_UTILITIES_DEPRECATED(Menu):
layout = self.layout
node_add_menu.add_node_type(layout, "FunctionNodeAlignEulerToVector")
node_add_menu.add_node_type(layout, "FunctionNodeRotateEuler")
node_add_menu.draw_assets_for_catalog(layout, "Utilities/Deprecated")
class NODE_MT_category_GEO_UTILITIES_FIELD(Menu):
@@ -97,6 +97,8 @@ static Set<StringRef> get_builtin_menus(const int tree_type)
"Mesh/UV",
"Point",
"Volume",
"Volume/Operations",
"Volume/Primitives",
"Simulation",
"Material",
"Texture",
@@ -106,7 +108,9 @@ static Set<StringRef> get_builtin_menus(const int tree_type)
"Utilities/Vector",
"Utilities/Field",
"Utilities/Math",
"Utilities/Matrix",
"Utilities/Rotation",
"Utilities/Deprecated",
"Group",
"Layout",
"Unassigned"};