Skip to main content

easy menus from a single config across apps

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unimenu-0.4.3.tar.gz (302.3 kB view details)

Uploaded Source

Built Distribution

unimenu-0.4.3-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file unimenu-0.4.3.tar.gz.

File metadata

  • Download URL: unimenu-0.4.3.tar.gz
  • Upload date:
  • Size: 302.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for unimenu-0.4.3.tar.gz
Algorithm Hash digest
SHA256 220a05d3c4f21ebfd37b3c5b3b59e93b90d1e1791ae7b63e25c8d31bf4710a1b
MD5 478a464f6d9fb355216dc923a41ec43a
BLAKE2b-256 b022cdf75c3d9bf9215b0944d29f1cf65d82af5900ae5286a0b7ac4d5a7ccf51

See more details on using hashes here.

File details

Details for the file unimenu-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: unimenu-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for unimenu-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 30fc6b8767d717f362c781c721b04f3d3108f4f8b3438db5e7099f475994e0c1
MD5 b07549a46287908e5773639a39390cb6
BLAKE2b-256 551c7a363dfc2c9d8dabda137f4ca7f839f9031429da16e132d36a7ace9194cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page