Description
The Python Toolbar Button & Menu Creator is an editor plugin that allows you to add and extend the Unreal Editor toolbar and main menu to expose and execute your python functions. It uses a path-based syntax to specify a hierarchy of sub-menus and menu-items so developers can focus on the core functionality of their python-based plugins without worrying about how to expose it to the Unreal Editor.
Here’s an example of how to add a button to the Level Editor’s toolbar with a menu-item and submenu.
Create a singular parent menu:
imgspc.make_menu_item(menu_path=’Menu Title’, icon_path=’MyPlugin/Icons/ToolbarIcon.png’)
Create a menu-item that executes the provided callback when clicked:
imgspc.make_menu_item(menu_path=’Menu Title/Menu Item 1′, callback=’client_script.sample_callback1()’)
Create a nested sub-menu and menu-item with the provided icon:
imgspc.make_menu_item(menu_path=’Menu Title/Submenu/Menu Item 2′, callback=’client_script.sample_callback2()’, icon_path=’MyPlugin/Icons/MenuItemIcon.png’”, tooltip=’Another sample callback’)
Please refer to the Documentation and Example Project for more details.
Technical Details
Code Modules: UnrealMenuItem (Editor)
Number of Blueprints: 0
Number of C++ Classes: 4
Network Replicated: No
Supported Development Platforms: Win64, Linux, Mac
Supported Target Build Platforms: N/A (Editor only)
Example Projects & Documentation: https://github.com/imgspc/UnrealMenuItem-Docs
Please visit our Support Forum if you have any questions or comments.
Supported Engine Versions
4.25 – 4.27, 5.0