rfm2  22.0
A python-based rewrite of RenderMan for Maya
rfm2.config.Config Class Reference
+ Inheritance diagram for rfm2.config.Config:
+ Collaboration diagram for rfm2.config.Config:

Public Member Functions

def __init__ (self, rfm_env)
 
def get_node_descriptions (self)
 
def get_node_descriptions_by_type (self, ntype)
 
def get_node_description_by_name (self, name)
 
def register_node_description (self, desc, force=False)
 
def renderer_executable (self, executable)
 
def get_textured_params (self)
 
def get_shading_fragments_paths (self)
 
def setup_lpe_lobe_ids (self)
 
def register_custom_shading_grp (self, nodetype)
 
def custom_shading_grp_nodetypes (self)
 
def predefined_user_tokens (self)
 

Public Attributes

 rfm_env
 
 build_info
 
 maya_version
 
 root_dir
 
 scripts_dir
 
 plugins_dir
 
 renderxml_dir
 
 icons_dir
 
 config_dir
 
 rmantree
 
 os
 
 license
 
 extra_config_paths
 
 node_desc_dict
 
 desc_file_dict
 
 nodes_by_type
 
 node_classifications
 
 desc_search_paths
 
 node_exclusion_list
 
 rman_search_paths
 
 woffs
 
 dirmaps
 
 tractor_cfg
 
 vstruct_force_connect
 
 translationTable
 
 translateMayaToPxrDict
 
 translatePxrToMayaDict
 
 textured_params
 
 aovs
 
 dch_sources
 
 syntaxDefinitions
 
 displayDriverExtensions
 
 node_compat_dict
 
 custom_shading_nodetypes
 
 user_path
 
 shot_path
 
 show_path
 
 site_path
 

Detailed Description

A class to store the plugin's configuration data.

This includes:
    * search paths
    * current platform
    * node descriptions
    * AOV definitions, translation table, syhtax definitions, etc.

We initialise the config based on a single path: the path of the rfm install.

1. find core components (scripts, config files, etc) based on the plugin's
   path.
2. check for RFM_SITE_PATH environment variable to register a directory
   containing extra components.
3. check for RFM_SHOW_PATH environment variable to register a directory
   containing extra components.
4. check for RFM_SHOT_PATH environment variable to register a directory
   containing extra components.
5. Finally, look a the user's home directory for extra customizations.

A typical site/show/user directory is named 'rfm' and may contain:
- .../rfm/args/*.args: contain args files for custom integrators, bxdfs, osl
  patterns, etc.
- .../rfm/aovs.json: additional custom AOVs definitions
- .../rfm/syntaxDefinitions.json: additional syntax definitions for the
  scriptEditor widget.

Constructor & Destructor Documentation

◆ __init__()

def rfm2.config.Config.__init__ (   self,
  rfm_env 
)
Initialise the config based on a single path: the path of the rfm
install.

Args:
    rfm_dir_path (str): The path to the rfm directory
    rfm_version (str): the current version, i.e. '22.0a1'

Member Function Documentation

◆ custom_shading_grp_nodetypes()

def rfm2.config.Config.custom_shading_grp_nodetypes (   self)
Return a list of node types carrying a custom shading group
attribute.

◆ get_node_description_by_name()

def rfm2.config.Config.get_node_description_by_name (   self,
  name 
)
Get a node description by name.

Args:
- name (str): 'PxrSurface' or any other node name.

Returns:
- A single RfmNodeDesc on success, otherwise None.

◆ get_node_descriptions()

def rfm2.config.Config.get_node_descriptions (   self)
Returns the dict containing all RfmNodeDesc objects.

Returns:
    dict: a {nodeName: RfmNodeDesc} dictionnary.

◆ get_node_descriptions_by_type()

def rfm2.config.Config.get_node_descriptions_by_type (   self,
  ntype 
)
Returns all node descriptions of a given type (bxdf, pattern, etc).

Args:
- ntype (str): bxdf, pattern, displace, light, lightfilter, etc.

Returns:
- A list of RfmNodeDesc instances on success, otherwise None.

◆ get_shading_fragments_paths()

def rfm2.config.Config.get_shading_fragments_paths (   self)
Return a list of directory containing 'shadeFraments' and \
'fragmentGraphs' directories to be searched by rfm2.vp.shading.

◆ get_textured_params()

def rfm2.config.Config.get_textured_params (   self)
Returns a {nodeType: [RfmNodeDescParams, ...]} for all parameters marked
as textures.
To mark a parameter as textured, it must have an "option" of type
"texture" or "env".

◆ predefined_user_tokens()

def rfm2.config.Config.predefined_user_tokens (   self)
Returns user tokens predefined in rfm.json.

◆ register_custom_shading_grp()

def rfm2.config.Config.register_custom_shading_grp (   self,
  nodetype 
)
Register a maya node type that carries our custom shading group attribute,
so we know that connected materials can not be cleaned-up.

◆ register_node_description()

def rfm2.config.Config.register_node_description (   self,
  desc,
  force = False 
)
Allow a node, i.e. PxrOSL, to register a new node description.

Args:
- desc (RfmNodeDesc): a RfmNodeDesc instance.
+ Here is the call graph for this function:

◆ renderer_executable()

def rfm2.config.Config.renderer_executable (   self,
  executable 
)
Return the full path to a RenderManProServer binary.

Args:
- executable (str): The name of the command line app.

Returns:
- Full path to the executable.

Raises:
- RfmError: if the executable doesn't exist.

◆ setup_lpe_lobe_ids()

def rfm2.config.Config.setup_lpe_lobe_ids (   self)
Sets the default values of the LPE lobe IDs params on the rmanGlobals
node, based on the contents of rfm.json.
We edit the node description to modify some defaults before it is used
to create a maya node. This way, we are sure the defaults are whatever
the user chose and are properly restored on scene load if modified.
These rmanGlobals attributes will be output as options in the scene
description.
+ Here is the call graph for this function:

Member Data Documentation

◆ aovs

rfm2.config.Config.aovs

◆ build_info

rfm2.config.Config.build_info

◆ config_dir

rfm2.config.Config.config_dir

◆ custom_shading_nodetypes

rfm2.config.Config.custom_shading_nodetypes

◆ dch_sources

rfm2.config.Config.dch_sources

◆ desc_file_dict

rfm2.config.Config.desc_file_dict

◆ desc_search_paths

rfm2.config.Config.desc_search_paths

◆ dirmaps

rfm2.config.Config.dirmaps

◆ displayDriverExtensions

rfm2.config.Config.displayDriverExtensions

◆ extra_config_paths

rfm2.config.Config.extra_config_paths

◆ icons_dir

rfm2.config.Config.icons_dir

◆ license

rfm2.config.Config.license

◆ maya_version

rfm2.config.Config.maya_version

◆ node_classifications

rfm2.config.Config.node_classifications

◆ node_compat_dict

rfm2.config.Config.node_compat_dict

◆ node_desc_dict

rfm2.config.Config.node_desc_dict

◆ node_exclusion_list

rfm2.config.Config.node_exclusion_list

◆ nodes_by_type

rfm2.config.Config.nodes_by_type

◆ os

rfm2.config.Config.os

◆ plugins_dir

rfm2.config.Config.plugins_dir

◆ renderxml_dir

rfm2.config.Config.renderxml_dir

◆ rfm_env

rfm2.config.Config.rfm_env

◆ rman_search_paths

rfm2.config.Config.rman_search_paths

◆ rmantree

rfm2.config.Config.rmantree

◆ root_dir

rfm2.config.Config.root_dir

◆ scripts_dir

rfm2.config.Config.scripts_dir

◆ shot_path

rfm2.config.Config.shot_path

◆ show_path

rfm2.config.Config.show_path

◆ site_path

rfm2.config.Config.site_path

◆ syntaxDefinitions

rfm2.config.Config.syntaxDefinitions

◆ textured_params

rfm2.config.Config.textured_params

◆ tractor_cfg

rfm2.config.Config.tractor_cfg

◆ translateMayaToPxrDict

rfm2.config.Config.translateMayaToPxrDict

◆ translatePxrToMayaDict

rfm2.config.Config.translatePxrToMayaDict

◆ translationTable

rfm2.config.Config.translationTable

◆ user_path

rfm2.config.Config.user_path

◆ vstruct_force_connect

rfm2.config.Config.vstruct_force_connect

◆ woffs

rfm2.config.Config.woffs

The documentation for this class was generated from the following file: