Skip to main content

UniMenu (Universal Menu)

PyPI Downloads 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

If you use Blender, you can try the unimenu_addon

how to use

load from config (YAML & JSON)

items:
  - label: my menu
    items:
      - label: my item
        command: print("Hello World")
import unimenu
config_path = "path/to/config.yaml"
unimenu.setup(config_path)

load from a dict

import unimenu
data = {"items": [{"label": "test","command": 'print("hello world")'}]}
unimenu.setup(data)

with code

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()
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

  • add editable install instructions

samples

You can install the unimenu samples with

pip install git+https://github.com/hannesdelbeke/unimenu@main#subdirectory=dev

then you can run them with e.g.

import unimenu_samples.any_dcc_test

Release files for unimenu 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unimenu 0.4.4
File Size Uploaded
unimenu-0.4.4.tar.gz 302.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unimenu 0.4.4
File Interpreter ABI Platform
unimenu-0.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 329.7 kB

Release files / unimenu-0.4.4.tar.gz

Download URL unimenu-0.4.4.tar.gz
Size 302.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3911c536875c3e1d83b9045547419ee9fa54b76a331751728b7027da409e1b6c
BLAKE2b-256 checksum
How to use checksums
bfbb5b907fe524a6facf8cc58a5de37e82bf77ecfc7df571c8280a2bbd4d7ac5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / unimenu-0.4.4-py3-none-any.whl

Download URL unimenu-0.4.4-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9af963f25e4aec5e350bcf29edc9ced2a94ce8bff66fb558d03d9a3825299bd3
BLAKE2b-256 checksum
How to use checksums
4f08596d50cb6e1736bdabdf36ba46a57808f2d7cbc8a323803ee74b2b384779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release history Release notifications | RSS feed

3.0.0

2 release files

This release

0.4.4 This release

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.2.3

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page