rfm2  22.0
A python-based rewrite of RenderMan for Maya
 All Classes Namespaces Files Functions Variables Pages
rfm2.ui.menu Namespace Reference

Functions

def create_menu_item
 
def post_menu
 
def maya_window
 
def create
 
def remove
 

Variables

string _MENU_NAME_ = 'RenderManMenu'
 
 _MENU_CTL_ = None
 
 _MENU_DICT_ = None
 

Function Documentation

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:

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:

def rfm2.ui.menu.maya_window ( )
Return Maya's main widow name.

+ Here is the caller graph for this function:

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:

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:

Variable Documentation

rfm2.ui.menu._MENU_CTL_ = None
rfm2.ui.menu._MENU_DICT_ = None
string rfm2.ui.menu._MENU_NAME_ = 'RenderManMenu'