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

Functions

def fix_channel_names ()
 
def set_display_type (display_type, display=None)
 
def driver_params (driver_node)
 
def set_light_group (src, lgt_grp)
 
def get_displays (as_json=False, baking=None, override_dst=None)
 
def new_virtual_displaychannel (config_name)
 
def create_preset_display (name, globals_node='rmanGlobals')
 

Detailed Description

Scripting functions related to displays and display channels.

Function Documentation

◆ create_preset_display()

def rfm2.api.displays.create_preset_display (   name,
  globals_node = 'rmanGlobals' 
)
Create a fully configured display based on available definitions from
aovs.json.

Arguments:
    name {str} -- The name of the preset.
+ Here is the call graph for this function:

◆ driver_params()

def rfm2.api.displays.driver_params (   driver_node)
Return a dict containing the node's name, type and params.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fix_channel_names()

def rfm2.api.displays.fix_channel_names ( )
Ensure the rmanDisplayChannels' "name" attribute contains the actual
channel name, not the node name, to avoid outputing "a1" instead of "a".
The C++ code depends on this value to be set to do the right thing.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_displays()

def rfm2.api.displays.get_displays (   as_json = False,
  baking = None,
  override_dst = None 
)
Return a dict describing the current AOV settings. See example below.
- Message attributes return their connection or None if not connected.
- The 'filePath' field is un-substituted but contains the full path to the
  final image for that display (with proper slashes/backslashes depending
  on the current platform).
- The function will take into account:
  - the mode (interactive/batch)
  - the image destination (viewport/render/it/driver)
  - the 'enable' state of the displays/displayChannels.

This functions should be called at the begining of the render to get the
AOV configuration. The returned data can then be re-used accross frames,
and each display's 'filePath' field used to compute the final image
location.

{ 'channels': {
    u'Ci': { u'channelSource': { 'type': u'string', 'value': u'Ci'},
             u'channelType': { 'type': u'string', 'value': u'color'},
             u'enable': { 'type': u'int', 'value': True},
             u'lpeLightGroup': { 'type': u'string', 'value': None},
             u'remapBreakPoint': { 'type': u'float', 'value': 0.0},
             u'remapMaxValue': { 'type': u'float', 'value': 0.0},
             u'remapSmoothness': { 'type': u'float', 'value': 0.0}
           },
    u'a': { u'channelSource': { 'type': u'string', 'value': u'a'},
            u'channelType': { 'type': u'string', 'value': u'float'},
            u'enable': { 'type': u'int', 'value': True},
            u'lpeLightGroup': { 'type': u'string', 'value': None},
            u'remapBreakPoint': { 'type': u'float', 'value': 0.0},
            u'remapMaxValue': { 'type': u'float', 'value': 0.0},
            u'remapSmoothness': { 'type': u'float', 'value': 0.0}
          }
  },
  'displays': {
      u'rmanDefaultDisplay':{
          'driverNode': {'name': u'd_openexr1', 'type': 'd_openexr', 'params': {...}},
          'filePath': u'<ws>/images/<scene>_<jobid>/<scene>_<layer>_<aov>.<f4>.<ext>',
          'params': { u'enable': { 'type': u'int', 'value': True},
                      u'displayChannels': { 'type': u'message', 'value': [ u'Ci', u'a']},
                      u'displayType': { 'type': u'message', 'value': u'd_openexr'},
                      u'remapBreakPoint': { 'type': u'float', 'value': 0.0},
                      u'remapMaxValue': { 'type': u'float', 'value': 0.0},
                      u'remapSmoothness': { 'type': u'float', 'value': 0.0}
                      }
          }
    }
}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ new_virtual_displaychannel()

def rfm2.api.displays.new_virtual_displaychannel (   config_name)
Instead of creating a maya node, just make a copy of the node desc and set its
params based requested channel preset.
+ Here is the call graph for this function:

◆ set_display_type()

def rfm2.api.displays.set_display_type (   display_type,
  display = None 
)
Change the display type used by the specified display node.

Args:
- display_type (str): name of the type.
- display (str): name of the display node.  If not specified, all displays are set.

Returns:
- None

◆ set_light_group()

def rfm2.api.displays.set_light_group (   src,
  lgt_grp 
)
Insert the light group in a LPE containing "<L.>".
+ Here is the caller graph for this function: