""" This module contains blender UI elements :author: Autour de Minuit :maintainers: Florentin LUCE :date: 2024 """ import bpy class NODEKIT_MT_node_kit(bpy.types.Menu): bl_label = "Node kit" def draw(self, context): layout = self.layout layout.operator('node_kit.copy_node_tree', text='Copy node tree', icon='COPYDOWN') layout.operator('node_kit.paste_node_tree', text='Paste node tree', icon='PASTEDOWN') layout.separator() classes = ( NODEKIT_MT_node_kit, ) def draw_menu(self, context): self.layout.menu('NODEKIT_MT_node_kit') def register(): for c in classes: bpy.utils.register_class(c) bpy.types.NODE_MT_editor_menus.append(draw_menu) def unregister(): for c in reversed(classes): bpy.utils.unregister_class(c) bpy.types.NODE_MT_editor_menus.remove(draw_menu)