Menu(bpy_struct)

base class — bpy_struct

class bpy.types.Menu(bpy_struct)

Editor menu containing buttons

bl_idname

If this is set, the menu gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is “OBJECT_MT_hello”, and bl_idname is not set by the script, then bl_idname = “OBJECT_MT_hello”

Type :string, default “”
bl_label

The menu label

Type :string, default “”
layout

Defines the structure of the menu in the UI.

Type :UILayout, (readonly)
classmethod poll(context)

If this method returns a non-null output, then the menu can be drawn.

Return type:boolean
draw(context)

Draw UI elements into the menu UI layout.

classmethod append(draw_func)

Prepend an draw function to this menu, takes the same arguments as the menus draw function.

draw_preset(context)

Define these on the subclass - preset_operator - preset_subdir

path_menu(searchpaths, operator, props_default={})
classmethod prepend(draw_func)

Prepend a draw function to this menu, takes the same arguments as the menus draw function.

classmethod remove(draw_func)

Remove a draw function that has been added to this menu

Inherited Properties

Inherited Functions

Previous topic

MaterialVolume(bpy_struct)

Next topic

Mesh(ID)