Skip to main content
3 of 5
added 55 characters in body
def menu_func(self, context):
    self.layout.operator("YOUR OPERATOR BL_IDNAME")
    # bl_idname should be in form of "something.something"
    # or YourClass.bl_idname

def register():
   # register classes so blender knows about them
   bpy.utils.register_module(__name__)
   # this adds your menu to shift-a add object menu
   bpy.types.INFO_MT_add.prepend(menu_func)
   # if you want to add to mesh menu use INFO_MT_mesh_add
   # other menu classes you can find in \scripts\startup\bl_ui\
   # by looking into the files there (i.e.: space_view3d.py)
 
def unregister():
    bpy.utils.unregister_module(__name__)
    bpy.types.INFO_MT_add.remove(menu_func)

if __name__ == "__main__":
    register()