As title, although it is not a good practice to insert any additional button in a built-in menu. What if I meant to do so?
bpy.types.Menu only provide menu.prepend(call_func) and menu.append(call_func) to make custom draw method in front or behind the original buttons.
Menu(bpy_struct) only said it is not possible to reference menus in Blender’s default scripts. So is the concept of draw is working like following code?
issubclass(menu, bpy.types.Menu)
if menu.prepend_callback:
for menu_func in menu.prepend_callback:
GUI.draw(menu_func)
GUI.draw(self.draw)
if menu.append_callback:
for menu_func in menu.append_callback:
GUI.draw(menu_func)
And If I really need to do insertion, I will need to insert the menu function directly inside the panels source code?
