Skip to main content

menuet

PyPI Buy Me a Coffee

Declarative menu builder for DCC applications

DocumentationPyPIGitLabGitHubChangelogContributing


Blender 3ds Max
Maya macOS Native
macOS Windows
Unreal Engine Houdini
Substance Painter Substance Designer
MotionBuilder Maya Marking Menu
Nuke

Features

  • Load menu from a TOML, JSON, YAML, from a Python dict, from entry points, or build it programmatically
  • Supports, Blender, 3ds Max, Maya, MotionBuilder, Unreal, Houdini, Substance Designer, Substance Painter, and any PySide6 application
  • Declare one or more menus in a dedicated .toml, .json or .yaml file
  • Compose menu from multiple files
  • Declare menu in a pyproject.toml

Installation

pip install menuet

Usage

Create a menu configuration in TOML format.

# menu.toml
[[action]]
id = "print-hello"
label = "Print Hello"
cb = "print('Hello')"
group = "Separator"

[[action]]
id = "open-gui"
label = "Open GUI"
cb = "ep:myapp.gui:open_gui"
menu = ["Foo", "Bar"]

Load the above configuration into a Model and pass that model to a Menu Builder to create a menu.

from pathlib import Path
from menuet import Model, loads
from menuet.builders.text import Render, TextMenuBuilder

model = Model()
loads(Path("menu.toml").read_text(), model)

builder = TextMenuBuilder(model, root_menu="Demo", render=Render.UTF8)
print(builder.build())
Demo
├── Foo
│   └── Bar
│       └── Open GUI
├── Separator ───
└── Print Hello

For more information and examples, visit the documentation at tahv.gitlab.io/menuet.

Contributing

Contributions of any kind are welcome. Please open an issue, or read the contribution guidelines and open a merge request.

Alternatives

Download files

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

Source Distribution

menuet-1.9.0.tar.gz (582.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

menuet-1.9.0-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 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