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

Classes

class  RfmError
 
class  FileFilter
 
class  BuildInfo
 
class  Config
 

Functions

def RfmWarnOnly (msg)
 
def time_this (f)
 
def is_ascii (string)
 
def non_ascii_warning (path)
 
def validate_paths (path_list, file_filter=None, ignore_list=[], ignored_dir_list=[])
 
def sanitize_path_list (path_collection)
 
def init (rfm_env)
 
def cfg ()
 
def maya_icon_paths ()
 
def print_paths ()
 
def reload_lpe_lobes ()
 

Variables

 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 NODE_COMPATIBILITY = 'nodeCompatibility.json'
 
string DEFAULT_DISPLAY_NAME = 'beauty'
 
string DEFAULT_DISPLAY_NODE = 'rmanDefaultDisplay'
 
string DEFAULT_BAKE_DISPLAY_NODE = 'rmanDefaultBakeDisplay'
 
tuple DEFAULT_DISPLAY_NODES = (DEFAULT_DISPLAY_NODE, DEFAULT_BAKE_DISPLAY_NODE)
 
list IGNORED_DIR_NAMES = ['config']
 
list VALID_OVERRIDES
 
 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

◆ cfg()

def rfm2.config.cfg ( )
Return the Config object

◆ init()

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:
+ Here is the caller graph for this function:

◆ is_ascii()

def rfm2.config.is_ascii (   string)
Tests if a unicode string can be safely converted to an ASCII str.

Arguments:
    string {unicode} -- the string to be tested

Returns:
    bool -- True if the string contains only ASCII characters.
+ Here is the caller graph for this function:

◆ maya_icon_paths()

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:

◆ non_ascii_warning()

def rfm2.config.non_ascii_warning (   path)
Output a warning if the path contains non-ascii characters that may create
problems as the renderer doesn't support them.

Arguments:
    path {unicode} -- the string to be tested
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_paths()

def rfm2.config.print_paths ( )
Print all paths from config object
+ Here is the call graph for this function:

◆ reload_lpe_lobes()

def rfm2.config.reload_lpe_lobes ( )
+ Here is the call graph for this function:

◆ RfmWarnOnly()

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:

◆ sanitize_path_list()

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.
+ Here is the call graph for this function:

◆ time_this()

def rfm2.config.time_this (   f)
Function that can be used as a decorator to time any method.
+ Here is the call graph for this function:

◆ validate_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.
+ Here is the call graph for this function:

Variable Documentation

◆ AOV_DEFINITION_FILE

string rfm2.config.AOV_DEFINITION_FILE = 'aovs.json'

◆ config

rfm2.config.config = None

◆ DEFAULT_BAKE_DISPLAY_NODE

string rfm2.config.DEFAULT_BAKE_DISPLAY_NODE = 'rmanDefaultBakeDisplay'

◆ DEFAULT_DISPLAY_NAME

string rfm2.config.DEFAULT_DISPLAY_NAME = 'beauty'

◆ DEFAULT_DISPLAY_NODE

string rfm2.config.DEFAULT_DISPLAY_NODE = 'rmanDefaultDisplay'

◆ DEFAULT_DISPLAY_NODES

tuple rfm2.config.DEFAULT_DISPLAY_NODES = (DEFAULT_DISPLAY_NODE, DEFAULT_BAKE_DISPLAY_NODE)

◆ EXTENSIONS_FILE

string rfm2.config.EXTENSIONS_FILE = 'extensions.json'

◆ IGNORED_DIR_NAMES

list rfm2.config.IGNORED_DIR_NAMES = ['config']

◆ MENU_FILE

string rfm2.config.MENU_FILE = 'menu.json'

◆ NODE_COMPATIBILITY

string rfm2.config.NODE_COMPATIBILITY = 'nodeCompatibility.json'

◆ NODE_FILE

string rfm2.config.NODE_FILE = 'nodes.json'

◆ SHELF_FILE

string rfm2.config.SHELF_FILE = 'shelf.json'

◆ SYNTAX_DEFINITION_FILE

string rfm2.config.SYNTAX_DEFINITION_FILE = 'syntaxDefinitions.json'

◆ this

rfm2.config.this = sys.modules[__name__]

◆ TRANSLATION_TABLE_FILE

string rfm2.config.TRANSLATION_TABLE_FILE = 'mayaTranslation.json'

◆ VALID_OVERRIDES

list rfm2.config.VALID_OVERRIDES
Initial value:
1 = ['default', 'min', 'max', 'slidermin', 'slidermax', 'help',
2  'widget', 'options', 'activate']