Hello ,
i would like to learn how make my own custom menu and panel with shortcuts.
But every script and tutorial i follow or try to adapt ,
to add the refistration of the shortcuts, end up in errors.
Maybe there are some main changes from older to the new Blender2.90?
We must do it in python? there is no “menu builder” in blender?
Open a new script , using the template ui_menu
Add these lines to make it able to become an addon
import bpy
bl_info = {
"name": "MY_OWN_MENU",
"blender": (2, 80, 0),
"category": "Object",
}
class CustomMenu(bpy.types.Menu):
Save the file anywhere, using notepad and change the fileextention to .py like “My_custom_menu.py” now in blender -preference- addon , click install addon, and search your file. If done correctly your addon will appear in the window with the “name”: “MY_OWN_MENU” set the checkbox active.
Now open the blender-preference-keymap i am not sure of this part, i selected the 3D-view-3DviewGlobal and added a new key at the bottom. maybe this mean that out of the 3d view this key will not work. Since we are calling a menu, write “wm.call_menu” in the first field. this will make appear another field , Write in the exact name of the so: classOBJECT_MT_custom_menu . I read somewhere that f5 f6 f7 f8 area free-key left to user, set the hotkey you prefer. At every startup blender will load the addon, making work the shortcut. going in the addon window, we can uncheck the addon , to set it off, but without deleting her.