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

Classes

class  NodeDescError
 
class  NodeDescIgnore
 
class  DescFormat
 
class  DescPropType
 
class  DescNodeType
 
class  NodeDescParam
 
class  NodeDescParamXML
 
class  NodeDescParamOSL
 
class  NodeDescParamJSON
 
class  NodeDesc
 

Functions

def safe_value_eval
 
def validate_type
 
def startup_info
 
def vis_ops_func
 
def save_ref
 

Variables

list VALID_TYPES
 
list FLOAT3 = ['color', 'point', 'vector', 'normal']
 
dictionary DATA_TYPE_WIDTH
 
list OPTIONAL_ATTRS
 
dictionary INTERP_MAYA
 
dictionary INTERP_RMAN_TO_MAYA
 
dictionary COND_VIS_OP
 
dictionary DEFAULT_VALUE
 
tuple CFLOAT_REGEXP = re.compile(r'[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?f')
 
string PAGE_SEP = '|'
 
list PYTYPES = ['int', 'float']
 
dictionary OSL_TO_RIS_TYPES
 

Detailed Description

Classes to parse and store node descriptions.

Function Documentation

def rfm2.utils.node_desc.safe_value_eval (   raw_val)
def rfm2.utils.node_desc.save_ref (   idx_list,
  save = True 
)
Takes a number of test files, load them and serialize our representation
to disk for later comparison in unit tests.

Args:
    idx_list (list): list of file indices
    save (bool, optional): Save the file or not. used for debugging.
def rfm2.utils.node_desc.startup_info ( )
Returns a Windows-only object to make sure tasks launched through
subprocess don't open a cmd window.
NOTE: this will be moved to another module later.

Returns:
    subprocess.STARTUPINFO -- the properly configured object if we are on
                              Windows, otherwise None
def rfm2.utils.node_desc.validate_type (   pname,
  ptype 
)
def rfm2.utils.node_desc.vis_ops_func (   ops,
  trigger_params 
)
Limited (non-recursive) implementation of conditional visibility
parsing for katana-style hintdict.

Args:
- ops (dict): the conditional visibility arguments.
- trigger_params (list): a list to be filled with param names used by
conditional expressions
FIXME: regex keyword not implemented.

Variable Documentation

tuple rfm2.utils.node_desc.CFLOAT_REGEXP = re.compile(r'[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?f')
dictionary rfm2.utils.node_desc.COND_VIS_OP
Initial value:
1 = {'equalTo': '==',
2  'notEqualTo': '!=',
3  'greaterThan': '>',
4  'greaterThanOrEqualTo': '>=',
5  'lessThan': '<',
6  'lessThanOrEqualTo': '<=',
7  'regex': '~=',
8  'in': 'in'}
dictionary rfm2.utils.node_desc.DATA_TYPE_WIDTH
Initial value:
1 = {'int': 1, 'float': 1,
2  'color': 3, 'point': 3, 'vector': 3, 'normal': 3,
3  'matrix': 16, 'string': 0}
dictionary rfm2.utils.node_desc.DEFAULT_VALUE
Initial value:
1 = {'float': 0.0, 'float2': (0.0, 0.0), 'float3': (0.0, 0.0, 0.0),
2  'int': 0, 'int2': (0, 0),
3  'color': (0.0, 0.0, 0.0), 'normal': (0.0, 0.0, 0.0),
4  'vector': (0.0, 0.0, 0.0), 'point': (0.0, 0.0, 0.0),
5  'string': '',
6  'matrix': (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0,
7  0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0),
8  'message': None}
list rfm2.utils.node_desc.FLOAT3 = ['color', 'point', 'vector', 'normal']
dictionary rfm2.utils.node_desc.INTERP_MAYA
Initial value:
1 = {'none': 0,
2  'linear': 1,
3  'smooth': 2,
4  'spline': 3}
dictionary rfm2.utils.node_desc.INTERP_RMAN_TO_MAYA
Initial value:
1 = {'linear': 1,
2  'catmull-rom': 2,
3  'bspline': 3,
4  'constant': 0,
5  'none': 0}
list rfm2.utils.node_desc.OPTIONAL_ATTRS
Initial value:
1 = ['URL', 'buttonText', 'conditionalVisOp', 'conditionalVisPath',
2  'conditionalVisValue', 'connectable', 'digits',
3  'label', 'match', 'max', 'min', 'riattr', 'riopt',
4  'scriptText', 'sensitivity', 'slider', 'slidermax',
5  'slidermin', 'syntax', 'units', 'vstructConditionalExpr',
6  'vstructmember', 'hidden', 'uiStruct']
dictionary rfm2.utils.node_desc.OSL_TO_RIS_TYPES
Initial value:
1 = {'surface': DescNodeType.kBxdf,
2  'displacement': DescNodeType.kDisplacement,
3  'volume': DescNodeType.kBxdf,
4  'shader': DescNodeType.kPattern}
string rfm2.utils.node_desc.PAGE_SEP = '|'
list rfm2.utils.node_desc.PYTYPES = ['int', 'float']
list rfm2.utils.node_desc.VALID_TYPES
Initial value:
1 = ['int', 'int2', 'float', 'float2', 'color', 'point', 'vector',
2  'normal', 'matrix', 'string', 'struct', 'lightfilter',
3  'message', 'displayfilter', 'samplefilter']