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

Classes

class  RfmError
 
class  FileFilter
 
class  BuildInfo
 
class  Config
 

Functions

def RfmWarnOnly
 
def validate_paths
 
def sanitize_path_list
 
def init
 
def cfg
 
def maya_icon_paths
 

Variables

list this = sys.modules[__name__]
 
string TRANSLATION_TABLE_FILE = 'mayaTranslation.json'
 
string AOV_DEFINITION_FILE = 'aovs.json'
 
string NODE_FILE = 'nodes.json'
 
string MENU_FILE = 'menu.json'
 
string EXTENSIONS_FILE = 'extensions.json'
 
string SHELF_FILE = 'shelf.json'
 
string SYNTAX_DEFINITION_FILE = 'syntaxDefinitions.json'
 
string DEFAULT_DISPLAY_NAME = 'beauty'
 
string DEFAULT_DISPLAY_NODE = 'rmanDefaultDisplay'
 
list IGNORED_DIR_NAMES = ['config']
 
 config = None
 

Detailed Description

Create the general rfm configuration object.

rfm.json is the main configuration file.
- The plugin will load the core file first and then override it with other
  rfm.json found in the usual SITE, SHOW and USER locations.
  examples:
    RFM_SITE_PATH/config
- The dict built from the rfm.json file(s) is passed to rfm2.config.Config()
  to perform the usual initialisations.
- Config() will dynamically setup the environment variables maya relies on.

rfm.json:
- the published package contains a generic rfm.json.
- On the first plugin startup, its content will be validated and updated to
  make sure the plugin and renderman versions match.
  - later on, it is possible to edit the renderman version if need be.
  - even better, you can create an override rfm.json in your home directory:
    ~/rfm/config/rfm.json

Installer:
- Module file: 2 options
  - The installer could create RenderMan_for_Maya_22.0a1.mod file. It will need
    to set the location path in the file, nothing else.
  - The user could go to the plugin manager, locate and load manually the
    plugin. The module file will then be automatically created. Next time he
    opens maya, the plugin will be visible in the plugin manager.

Function Documentation

def rfm2.config.cfg ( )
def rfm2.config.init (   rfm_env)
Creates a Config object to store the plugin's configuration data.

This data will only be built once and persist during the whole Maya
session.

Args:
    root_dir (str): Full path to the rfm directory
    verbose (bool, optional): Spit out diagnostic messages when enabled.

+ Here is the call graph for this function:

def rfm2.config.maya_icon_paths ( )
Returns a string, specially formated for the MFileObject API, containing
a list of potential paths for icons.

+ Here is the call graph for this function:

def rfm2.config.RfmWarnOnly (   msg)
Only warn when an Exception occured.`

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def rfm2.config.sanitize_path_list (   path_collection)
Take a string containing a list of colon or semicolon-delimited paths \
and remove all paths containing either 'RendermanForMaya' or \
'RenderManProServer'.

The idea is to make sure our paths can be safely added without interference.

Args:
- path_collection (str): list of colon or semicolon-delimited paths.

Returns:
- A string without the offending paths.
def rfm2.config.validate_paths (   path_list,
  file_filter = None,
  ignore_list = [],
  ignored_dir_list = [] 
)
Recursively validate paths, optionally looking for files with a specific
extension.
Environment variables will be expanded.

Args:
    path_list (list): list of strings

Keyword Args:
    file_filter (FileFilter): A FileFilter value. If left to it's
                default (None), all extensions defined in FileFilter
                will be considered.

Variable Documentation

string rfm2.config.AOV_DEFINITION_FILE = 'aovs.json'
rfm2.config.config = None
string rfm2.config.DEFAULT_DISPLAY_NAME = 'beauty'
string rfm2.config.DEFAULT_DISPLAY_NODE = 'rmanDefaultDisplay'
string rfm2.config.EXTENSIONS_FILE = 'extensions.json'
list rfm2.config.IGNORED_DIR_NAMES = ['config']
string rfm2.config.MENU_FILE = 'menu.json'
string rfm2.config.NODE_FILE = 'nodes.json'
string rfm2.config.SHELF_FILE = 'shelf.json'
string rfm2.config.SYNTAX_DEFINITION_FILE = 'syntaxDefinitions.json'
list rfm2.config.this = sys.modules[__name__]
string rfm2.config.TRANSLATION_TABLE_FILE = 'mayaTranslation.json'