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

Classes

class  SceneStringConverter
 

Functions

def get_user_tokens
 
def get_all_tokens
 
def expand_string
 
def set_var
 
def reset_vars
 
def get_str_attr
 

Variables

list PAD_FMT = ['%d', '%01d', '%02d', '%03d', '%04d']
 
 __SCENE_STRING_CONVERTER__ = None
 

Function Documentation

def rfm2.api.strings.expand_string (   string,
  display = None,
  glob_sequence = False,
  frame = None 
)
expand a string containing tokens.

Args:
- string (str): a string that may or may not contain tokens.

Kwargs:
- display (str): the name of a rmanDisplay node that should be used to
update the <aov> and <ext> tokens.

Returns:
- The expanded string.

+ Here is the caller graph for this function:

def rfm2.api.strings.get_all_tokens ( )
Returns all tokens from the render globals as a dict. This includes the
user tokens.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def rfm2.api.strings.get_str_attr (   nodeattr,
  glob_sequence = False,
  frame = None 
)
getAttr a maya string plug and return its expanded value if it contains tokens.

Args:
- nodeattr (str): the plug, i.e. 'PxrDomeLight1.lightColorMap'.

Returns:
- expanded value of the attribute.

+ Here is the call graph for this function:

def rfm2.api.strings.get_user_tokens ( )
Return the string substitution user tokens as a dict.

+ Here is the caller graph for this function:

def rfm2.api.strings.reset_vars ( )
def rfm2.api.strings.set_var (   nm,
  val 
)

Variable Documentation

rfm2.api.strings.__SCENE_STRING_CONVERTER__ = None
list rfm2.api.strings.PAD_FMT = ['%d', '%01d', '%02d', '%03d', '%04d']