unimenu


Nameunimenu JSON
Version 0.4.3 PyPI version JSON
download
home_page
Summaryeasy menus from a single config across apps
upload_time2023-08-02 16:27:38
maintainer
docs_urlNone
authorhannes
requires_python>=3.4
license
keywords dcc pipeline menu config
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # UniMenu (Universal Menu)

<!---[![Coverage Status](https://coveralls.io/repos/github/hannesdelbeke/unimenu/badge.svg?branch=main)](https://coveralls.io/github/hannesdelbeke/unimenu?branch=main)-->

[![PyPI Downloads](https://img.shields.io/pypi/v/unimenu?color=0)](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<br>
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)

<img src="dev/unimenu_samples/menu_screen_maya.jpg" width="400"/> <img src="dev/unimenu_samples/menu_screen_unreal5.jpg" width="400"/> <img src="dev/unimenu_samples/menu_screen_krita.jpg" width="400"/> <img src="dev/unimenu_samples/menu_screen_substance_painter.jpg" width="400"/>
<img src="dev/unimenu_samples/menu_screen_nuke.jpg" width="400"/> <img src="dev/unimenu_samples/menu_screen_katana.jpg" width="400"/>
<img src="dev/unimenu_samples/menu_screen_mari.jpg" width="400"/>
# 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 (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
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "unimenu",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.4",
    "maintainer_email": "",
    "keywords": "dcc,pipeline,menu,config",
    "author": "hannes",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/b0/22/cdf75c3d9bf9215b0944d29f1cf65d82af5900ae5286a0b7ac4d5a7ccf51/unimenu-0.4.3.tar.gz",
    "platform": null,
    "description": "# UniMenu (Universal Menu)\n\n<!---[![Coverage Status](https://coveralls.io/repos/github/hannesdelbeke/unimenu/badge.svg?branch=main)](https://coveralls.io/github/hannesdelbeke/unimenu?branch=main)-->\n\n[![PyPI Downloads](https://img.shields.io/pypi/v/unimenu?color=0)](https://pypi.org/project/unimenu/)\n[![Wiki](https://img.shields.io/badge/wiki-documentation-0)](https://github.com/hannesdelbeke/unimenu/wiki)\n\nA pure python module to add python commands to the menu.\n\nSupports Unreal Engine, Blender, Marmoset<br>\nand any app that uses QT: Maya, Krita, Substance Painter, 3ds Max, FreeCAD, CryEngine ...\n\nFor more info read the [wiki](https://github.com/hannesdelbeke/unimenu/wiki)\n\nIf you use Blender, you can try the [unimenu_addon](https://github.com/hannesdelbeke/unimenu_addon)\n\n<img src=\"dev/unimenu_samples/menu_screen_maya.jpg\" width=\"400\"/> <img src=\"dev/unimenu_samples/menu_screen_unreal5.jpg\" width=\"400\"/> <img src=\"dev/unimenu_samples/menu_screen_krita.jpg\" width=\"400\"/> <img src=\"dev/unimenu_samples/menu_screen_substance_painter.jpg\" width=\"400\"/>\n<img src=\"dev/unimenu_samples/menu_screen_nuke.jpg\" width=\"400\"/> <img src=\"dev/unimenu_samples/menu_screen_katana.jpg\" width=\"400\"/>\n<img src=\"dev/unimenu_samples/menu_screen_mari.jpg\" width=\"400\"/>\n# how to use\n\n### load from config (YAML & JSON)\n```yaml\nitems:\n  - label: my menu\n    items:\n      - label: my item\n        command: print(\"Hello World\")\n```\n```python\nimport unimenu\nconfig_path = \"path/to/config.yaml\"\nunimenu.setup(config_path)\n```\n\n\n\n### load from a dict\n\n```python\nimport unimenu\ndata = {\"items\": [{\"label\": \"test\",\"command\": 'print(\"hello world\")'}]}\nunimenu.setup(data)\n```\n\n\n\n### with code\n\n```python\nimport unimenu\nmenu = unimenu.Node(label=\"my menu\")  # create a menu\nitem = unimenu.Node(label=\"hi\", command='print(\"hi\")')  # create a menu item\nmenu.items.append(item)  # add the item to the menu\nmenu.setup()  # setup the menu in the app, parented by default to the main menu bar\n```\n\n### from a folder of scripts (module)\n\nTo auto construct a menu from a folder, with a menu entry for every tool in a folder:\n1. ensure the folder is importable (in the sys.path)\n2. create a menthod in all submodules with the same name, e.g. def show()\n```python\nimport unimenu\nunimenu.module_setup('name_of_folder', function_name='show', menu_name=\"My tools\")\n```\n\n\n## When to use\n\nsome 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.\n\nThe power of this module comes from standardising menu creation across multiple software. Great for studio-pipelines with several programs.\nUnimenu makes menu creation less complex, e.g. in Blender.\n\n## Notes\n- support loading multiple configs. Great for a single studio config and several project configs. Or a team config.\n- support creating another config to a previously created menu, or submenu!\n\n## Supports\nunimenu was tested in the following versions, and might work in other versions.\n- Unreal 5.0.2\n- Blender 3.2, 2.93, 2.8 (minimum)\n- Maya 2023, 2022 (minimum)\n- Substance Painter 8.2.0\n- Max 2024\n- Marmoset 3.08\n- Nuke 13 (minimum)\n- Hiero 13 (minimum)\n- Katana 5 (minimum)\n- Mari 6.0 (minimum)\n\npython 3.7+ due to f-strings and pathlib\n\n## Development\n\nmain platform is windows, would be interested to hear from mac & linux users.\n\nfeel free to create a PR to help out.\n\nto add support for your favorite software, add a python module named after the software with a setup_menu function\nwhere possible stick to the windows menu [design guidelines](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/bb226797(v=vs.85))\n\n- [ ] add editable install instructions\n\n### samples\nYou can install the unimenu samples with\n```bash\npip install git+https://github.com/hannesdelbeke/unimenu@main#subdirectory=dev\n```\nthen you can run them with e.g.\n```python\nimport unimenu_samples.any_dcc_test\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "easy menus from a single config across apps",
    "version": "0.4.3",
    "project_urls": {
        "Documentation": "https://github.com/hannesdelbeke/unimenu/wiki",
        "Homepage": "https://github.com/hannesdelbeke/unimenu"
    },
    "split_keywords": [
        "dcc",
        "pipeline",
        "menu",
        "config"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "551c7a363dfc2c9d8dabda137f4ca7f839f9031429da16e132d36a7ace9194cc",
                "md5": "b07549a46287908e5773639a39390cb6",
                "sha256": "30fc6b8767d717f362c781c721b04f3d3108f4f8b3438db5e7099f475994e0c1"
            },
            "downloads": -1,
            "filename": "unimenu-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b07549a46287908e5773639a39390cb6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.4",
            "size": 26704,
            "upload_time": "2023-08-02T16:27:37",
            "upload_time_iso_8601": "2023-08-02T16:27:37.114202Z",
            "url": "https://files.pythonhosted.org/packages/55/1c/7a363dfc2c9d8dabda137f4ca7f839f9031429da16e132d36a7ace9194cc/unimenu-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b022cdf75c3d9bf9215b0944d29f1cf65d82af5900ae5286a0b7ac4d5a7ccf51",
                "md5": "478a464f6d9fb355216dc923a41ec43a",
                "sha256": "220a05d3c4f21ebfd37b3c5b3b59e93b90d1e1791ae7b63e25c8d31bf4710a1b"
            },
            "downloads": -1,
            "filename": "unimenu-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "478a464f6d9fb355216dc923a41ec43a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.4",
            "size": 302343,
            "upload_time": "2023-08-02T16:27:38",
            "upload_time_iso_8601": "2023-08-02T16:27:38.526608Z",
            "url": "https://files.pythonhosted.org/packages/b0/22/cdf75c3d9bf9215b0944d29f1cf65d82af5900ae5286a0b7ac4d5a7ccf51/unimenu-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-02 16:27:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hannesdelbeke",
    "github_project": "unimenu",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "unimenu"
}
        
Elapsed time: 0.09461s