Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hannesdelbeke/unimenu
easy consistent menus across apps: unreal, blender, maya, krita, substance painter, Katana, marmoset, 3ds max, cry-engine, FreeCAD, Hero, Nuke, Qt,...
https://github.com/hannesdelbeke/unimenu
3dsmax blender freecad katana krita marmoset maya menu nuke python substance-painter unreal unreal-engine
Last synced: 3 months ago
JSON representation
easy consistent menus across apps: unreal, blender, maya, krita, substance painter, Katana, marmoset, 3ds max, cry-engine, FreeCAD, Hero, Nuke, Qt,...
- Host: GitHub
- URL: https://github.com/hannesdelbeke/unimenu
- Owner: hannesdelbeke
- License: apache-2.0
- Created: 2022-09-30T19:54:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T13:27:52.000Z (11 months ago)
- Last Synced: 2024-05-08T00:12:32.501Z (9 months ago)
- Topics: 3dsmax, blender, freecad, katana, krita, marmoset, maya, menu, nuke, python, substance-painter, unreal, unreal-engine
- Language: Python
- Homepage: https://github.com/hannesdelbeke/unimenu/wiki/features-overview
- Size: 578 KB
- Stars: 78
- Watchers: 6
- Forks: 8
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# UniMenu (Universal Menu)
[![PyPI Downloads](https://img.shields.io/pypi/v/unimenu)](https://pypi.org/project/unimenu/)
[![Wiki](https://img.shields.io/badge/wiki-documentation-0)](https://github.com/hannesdelbeke/unimenu/wiki)A pure python module to add python commands to the menu.
Supports Unreal Engine, Blender, Marmoset
and any app that uses QT: Maya, Krita, Substance Painter, 3ds Max, FreeCAD, CryEngine ...For more info read the [wiki](https://github.com/hannesdelbeke/unimenu/wiki)
If you use Blender, you can try the [unimenu_addon](https://github.com/hannesdelbeke/unimenu_addon)
# how to use
### load from config (YAML & JSON)
```yaml
items:
- label: my menu
items:
- label: my item
command: print("Hello World")
```
```python
import unimenu
config_path = "path/to/config.yaml"
unimenu.setup(config_path)
```### load from a dict
```python
import unimenu
data = {"items": [{"label": "test","command": 'print("hello world")'}]}
unimenu.setup(data)
```### with code
```python
import unimenu
menu = unimenu.Node(label="my menu") # create a menu
item = unimenu.Node(label="hi", command='print("hi")') # create a menu item
menu.items.append(item) # add the item to the menu
menu.setup() # setup the menu in the app, parented by default to the main menu bar
```### from a folder of scripts (or a Python module)
To auto construct a menu from a folder, with a menu entry for every tool in a folder:
1. ensure the folder is importable (in the sys.path)
2. create a menthod in all submodules with the same name, e.g. def show()
```python
import unimenu
unimenu.module_setup('name_of_folder', function_name='show', menu_name="My tools")
```## When to use
some software e.g. Unity & Maya already have good ways to make custom menus. If you only use 1 software and find it easy to make a menu, you don't need unimenu.
The power of this module comes from standardising menu creation across multiple software. Great for studio-pipelines with several programs.
Unimenu makes menu creation less complex, e.g. in Blender.## Notes
- support loading multiple configs. Great for a single studio config and several project configs. Or a team config.
- support creating another config to a previously created menu, or submenu!## Supports
unimenu was tested in the following versions, and might work in other versions.
- Unreal 5.0.2
- Blender 3.2, 2.93, 2.8 (minimum)
- Maya 2023, 2022 (minimum)
- Substance Painter 8.2.0
- Max 2024
- Marmoset 3.08
- Nuke 13 (minimum)
- Hiero 13 (minimum)
- Katana 5 (minimum)
- Mari 6.0 (minimum)python 3.7+ due to f-strings and pathlib
## Development
main platform is windows, would be interested to hear from mac & linux users.
feel free to create a PR to help out.
to add support for your favorite software, add a python module named after the software with a setup_menu function
where possible stick to the windows menu [design guidelines](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/bb226797(v=vs.85))- [ ] add editable install instructions
### samples
You can install the unimenu samples with
```bash
pip install git+https://github.com/hannesdelbeke/unimenu@main#subdirectory=dev
```
then you can run them with e.g.
```python
import unimenu_samples.any_dcc_test
```