Maya runTimeCommand from menu
new in 2022
shows up in Maya search
- good example maya docs
For example, if you had a scriptuserSetup.py
that creates a menu containing special Foo rendering scripts, you would need to convert this:
to this:
# Create runTimeCommand
cmds.runTimeCommand('SubmitToFoo',
default=True,
label='Send to Foo',
annotation='Send your scene to Foo for cloud rendering.',
category='Menu items.Cloud.Render',
command='import foo_maya;foo_maya.submit_dialog()',
keywords='render',
tags='Render' )
# Create menu
cmds.menuItem(p=renderingMenu, rtc='SubmitToFoo')
- command reference docs
- supports tags & categories
- can enable a plugin it relies on
- can have an image (icon)
- todo example
Backlinks¶
- Maya search
- To make a custom command show up in the Maya search, see Maya runTimeCommand from menu
- Maya MPxCommand
- [!warning] see runtime commands
- Maya menu documentation