rfm2
22.0
A python-based rewrite of RenderMan for Maya
|
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 | |
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.
def rfm2.config.cfg | ( | ) |
Return the Config object
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.
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.
def rfm2.config.maya_icon_paths | ( | ) |
Returns a string, specially formated for the MFileObject API, containing a list of potential paths for icons.
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
def rfm2.config.print_paths | ( | ) |
Print all paths from config object
def rfm2.config.reload_lpe_lobes | ( | ) |
def rfm2.config.RfmWarnOnly | ( | msg | ) |
Only warn when an Exception occured.`
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.time_this | ( | f | ) |
Function that can be used as a decorator to time any method.
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.
string rfm2.config.AOV_DEFINITION_FILE = 'aovs.json' |
rfm2.config.config = None |
string rfm2.config.DEFAULT_BAKE_DISPLAY_NODE = 'rmanDefaultBakeDisplay' |
string rfm2.config.DEFAULT_DISPLAY_NAME = 'beauty' |
string rfm2.config.DEFAULT_DISPLAY_NODE = 'rmanDefaultDisplay' |
tuple rfm2.config.DEFAULT_DISPLAY_NODES = (DEFAULT_DISPLAY_NODE, DEFAULT_BAKE_DISPLAY_NODE) |
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_COMPATIBILITY = 'nodeCompatibility.json' |
string rfm2.config.NODE_FILE = 'nodes.json' |
string rfm2.config.SHELF_FILE = 'shelf.json' |
string rfm2.config.SYNTAX_DEFINITION_FILE = 'syntaxDefinitions.json' |
rfm2.config.this = sys.modules[__name__] |
string rfm2.config.TRANSLATION_TABLE_FILE = 'mayaTranslation.json' |