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

Functions

def show_docs ()
 
def get_rib_file_name (do_expand=False)
 
def get_editor (fpath)
 
def open_file (fname)
 
def view_statistics ()
 
def get_current_camera ()
 
def view_rib ()
 
def view_rib_for_selection ()
 
def toggle_render_selected ()
 
def txmake (infile, outdir=None, outfile=None, textype=None, args=None)
 
def autoplace_state (ncat)
 
def toggle_autoplace (ncat)
 
def autoplace (node_type)
 
def install_node_editor_solo ()
 
def validate_solo_key_pref (val)
 
def register_prefs ()
 

Variables

dictionary AUTOPLACE_TYPES
 

Detailed Description

Scripting functions related to the user interface.

Function Documentation

◆ autoplace()

def rfm2.api.ui_helpers.autoplace (   node_type)
Create a light or portal and position it based on current selection.
- Nothing selected: create one light with same position and orientation as
  the camera associated with the current viewport.
- Object selected: Create light(s) or portal(s) at the object(s)' center.
- Mesh Face selected: Create light(s) or portal(s) at the center of the
  shell(s) containing the selected face(s).

Arguments:
    node_type {str} -- node type to be created

Returns:
    list -- List of created nodes if successful
    None -- if autoplace is disabled or autoplace doesn't handle the node type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autoplace_state()

def rfm2.api.ui_helpers.autoplace_state (   ncat)
Returns whether autoplace is enabled or not for a given node category.

Arguments:
    ncat {str} -- Can be 'lights', 'portals' or 'filter_parented'

Returns:
    bool -- True if enabled
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_camera()

def rfm2.api.ui_helpers.get_current_camera ( )
+ Here is the caller graph for this function:

◆ get_editor()

def rfm2.api.ui_helpers.get_editor (   fpath)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_rib_file_name()

def rfm2.api.ui_helpers.get_rib_file_name (   do_expand = False)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ install_node_editor_solo()

def rfm2.api.ui_helpers.install_node_editor_solo ( )
Depending on the value of the rfmEnableNodeEditorSolo optionVar, replace
Maya's keyPressCommand for the current nodeEditor with ours and vice-versa.
+ Here is the caller graph for this function:

◆ open_file()

def rfm2.api.ui_helpers.open_file (   fname)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ register_prefs()

def rfm2.api.ui_helpers.register_prefs ( )
Register general prefs for the ScriptEditor widget: font face, size, etc.

◆ show_docs()

def rfm2.api.ui_helpers.show_docs ( )
Open the RenderMan documentation in a web browser

◆ toggle_autoplace()

def rfm2.api.ui_helpers.toggle_autoplace (   ncat)
Changes the enabled state for a given node category.

Arguments:
    ncat {str} -- Can be 'lights', 'portals' or 'filter_parented'
+ Here is the call graph for this function:

◆ toggle_render_selected()

def rfm2.api.ui_helpers.toggle_render_selected ( )

◆ txmake()

def rfm2.api.ui_helpers.txmake (   infile,
  outdir = None,
  outfile = None,
  textype = None,
  args = None 
)
A barebones txmake convert, without involving txmanager.
   Material viewer relies on this.

◆ validate_solo_key_pref()

def rfm2.api.ui_helpers.validate_solo_key_pref (   val)
Return a valid key shortcut and save the key and optional modifiers in
separate prefs.

Arguments:
    val {str} -- string like '`', 'alt-1', 'ctrl-alt-1', etc

Returns:
    str -- The validated string that will appear in the prefs panel.
+ Here is the call graph for this function:

◆ view_rib()

def rfm2.api.ui_helpers.view_rib ( )
Generate and view a rib file for the current frame.
+ Here is the call graph for this function:

◆ view_rib_for_selection()

def rfm2.api.ui_helpers.view_rib_for_selection ( )
Generate and view a rib file for the current selection.
+ Here is the call graph for this function:

◆ view_statistics()

def rfm2.api.ui_helpers.view_statistics ( )
Open the statistics file for the current scene in a web browser.
+ Here is the call graph for this function:

Variable Documentation

◆ AUTOPLACE_TYPES

dictionary rfm2.api.ui_helpers.AUTOPLACE_TYPES
Initial value:
1 = {'lights': ('rfmAutoPlaceLights', False),
2  'portals': ('rfmAutoPlacePortals', False),
3  'filter_parented': ('rfmAutoPlaceLightfiltersParented', False)}