Shaders: Move repeat and closure/bundle nodes into Utilities submenu
It may be worth reconsidering how to organize these menus and add consistency with geometry nodes. However we should at least avoid putting these as 5 new top level entries. Ref #141936 Pull Request: https://projects.blender.org/blender/blender/pulls/146607
This commit is contained in:
committed by
Brecht Van Lommel
parent
ddef26505b
commit
52c028e0b0
@@ -407,6 +407,21 @@ class NODE_MT_category_shader_group(Menu):
|
||||
node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
|
||||
|
||||
|
||||
class NODE_MT_category_shader_utilities(Menu):
|
||||
bl_idname = "NODE_MT_category_shader_utilities"
|
||||
bl_label = "Utilities"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
node_add_menu.add_repeat_zone(layout, label="Repeat")
|
||||
layout.separator()
|
||||
node_add_menu.add_closure_zone(layout, label="Closure")
|
||||
node_add_menu.add_node_type(layout, "NodeEvaluateClosure")
|
||||
node_add_menu.add_node_type(layout, "NodeCombineBundle")
|
||||
node_add_menu.add_node_type(layout, "NodeSeparateBundle")
|
||||
|
||||
|
||||
class NODE_MT_shader_node_add_all(Menu):
|
||||
bl_idname = "NODE_MT_shader_node_add_all"
|
||||
bl_label = "Add"
|
||||
@@ -422,16 +437,12 @@ class NODE_MT_shader_node_add_all(Menu):
|
||||
layout.menu("NODE_MT_category_shader_shader")
|
||||
layout.menu("NODE_MT_category_shader_texture")
|
||||
layout.menu("NODE_MT_category_shader_vector")
|
||||
layout.menu("NODE_MT_category_shader_utilities")
|
||||
layout.separator()
|
||||
layout.menu("NODE_MT_category_shader_script")
|
||||
layout.separator()
|
||||
layout.menu("NODE_MT_category_shader_group")
|
||||
layout.menu("NODE_MT_category_layout")
|
||||
node_add_menu.add_repeat_zone(layout, label="Repeat")
|
||||
node_add_menu.add_closure_zone(layout, label="Closure")
|
||||
node_add_menu.add_node_type(layout, "NodeEvaluateClosure")
|
||||
node_add_menu.add_node_type(layout, "NodeCombineBundle")
|
||||
node_add_menu.add_node_type(layout, "NodeSeparateBundle")
|
||||
|
||||
node_add_menu.draw_root_assets(layout)
|
||||
|
||||
@@ -447,6 +458,7 @@ classes = (
|
||||
NODE_MT_category_shader_vector,
|
||||
NODE_MT_category_shader_script,
|
||||
NODE_MT_category_shader_group,
|
||||
NODE_MT_category_shader_utilities,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user