rfm2  22.0
A python-based rewrite of RenderMan for Maya
rfm2.ui.menu Namespace Reference

Functions

def create_menu_item (parent, ctl, desc)
 
def post_menu (*args)
 
def maya_window ()
 
def create ()
 
def remove ()
 

Function Documentation

◆ create()

def rfm2.ui.menu.create ( )
Create the renderMan menu in the main menu bar.
We save the menu path in _MENU_CTL_ to make it easier for remove() to
destroy it on tear down.

Raises:
- RfmError: if the menu could not be created.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_menu_item()

def rfm2.ui.menu.create_menu_item (   parent,
  ctl,
  desc 
)
Create a menu item. This will be called recursively to create sub-menus.
See rfm/config/menuSchema.json for full syntax.

commands we go through a substitution step, for creative uses.
For example:

    "rmanMenuSelThis": {
        "label": "This",
        "command": "print 'I selected %(label)s !'"}

will print 'I selected This !'
We currently substitute 'label' and 'item' (the menu item's name).

Args:
- parent (str): the parent menu.
- ctl (str): the new menu item name.
- desc (str): the dict discribing the menu item.

Returns:
- the menu item name/path
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maya_window()

def rfm2.ui.menu.maya_window ( )
Return Maya's main widow name.
+ Here is the caller graph for this function:

◆ post_menu()

def rfm2.ui.menu.post_menu ( args)
Called by maya to populate the menu.

Args:
- menu_ctl (str): The menu we should populate.
+ Here is the call graph for this function:

◆ remove()

def rfm2.ui.menu.remove ( )
Delete the RenderMan menu. This is called when we un-register the
renderer.

We only issue a warning if the operation failed.
+ Here is the call graph for this function:
+ Here is the caller graph for this function: