Skip to main content

easy menus from a single config across apps

Project description

UniMenu (Universal Menu)

A pure python module to add python commands to the menu.

Supports Unreal Engine, Blender, Maya, Krita, Substance Painter, 3ds Max, Marmoset

For more info you can now checkout the wiki

how to use

you can make your menu(s):

  • from a config
  • from a dict
  • with explicit code
  • from a folder of scripts

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 dynamic dict

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

with code

import unimenu.dccs.blender
menu = unimenu.dccs.blender.MenuNodeBlender(label="my submenu")  # create a submenu, parent defaults to the menu bar
item = unimenu.dccs.blender.MenuNodeBlender(label="hello", command='print("hello world")', parent="UNIMENU_MT_my_submenu")  # add menu item to our submenu
menu.items.append(item)  # add the item to the submenu
menu.setup()  # setup the menu

from a folder of scripts (module) (experimental, needs updating)

great for a folder full of tools that need launching when clicking a button.

  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

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

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.0.0.tar.gz (140.7 kB view details)

Uploaded Source

Built Distribution

unimenu-0.0.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for unimenu-0.0.0.tar.gz
Algorithm Hash digest
SHA256 43467d4b9662afc710220d24ae5813bee2249b17fe87cc210cf7afbe0b44cf68
MD5 46bb2154abc04f05c2404099f4edede4
BLAKE2b-256 eac6dae40fae950533705eed18e13ffd552035e5c1cee95cee0fc4a1d0ac9fee

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for unimenu-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6833ff95f95deda354dbc8854e09fab7bbc1a05a7d7b7133d8e15299a6f8a17
MD5 0a3307071befa446c6657aaa60004a3c
BLAKE2b-256 d27b682747fb53a8b2f30106be83d5683dc02b38109678f660d3ebaa27195ace

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