rfm2
22.0
A python-based rewrite of RenderMan for Maya
|
Functions | |
def | rfm_ui_templates () |
def | set_rfm_stylesheet (root) |
def | rfm_node_help (ntype) |
def | page_iterator (lyt) |
def | register_condvis_pages (ntype, pnames, func=None) |
def | expand_closure (ntype) |
def | update_page_visibility (nodeattr, retry=False) |
def | hide_ramp_frame (page_name, *_args) |
def | rfm_control (ntype, nattr, prefix='', debug=False) |
def | rfm_ext_control (nattr) |
def | setup_control (ui_class, desc, param, ctlname, nodeattr) |
Variables | |
long = int | |
string | RGSTYLESHEET |
dictionary | WIDGET_CLASS |
list | SPECIAL_WIDGETS |
dictionary | CONDVIS_PAGES = {} |
Defines the widget creation and update mecanism.
def rfm2.ui.widgets.expand_closure | ( | ntype | ) |
Return a function to update conditional page visibility when a page is expanded. Arguments: ntype {str} -- node type Returns: function pointer
def rfm2.ui.widgets.hide_ramp_frame | ( | page_name, | |
* | _args | ||
) |
Hide a maya ramp widget's enclosing frame label if the enclosing page label starts with the same label. Arguments: page_name {str} -- name of the enclosing page _args {stuff} -- unused: obey MEL calling convention.
def rfm2.ui.widgets.page_iterator | ( | lyt | ) |
Generator recursively finding frameLayout controls enclosed in 'lyt'. NOTE: it will only find pages that have already been created. The AE only creates sub pages when they are made visible. Args: - layout (str): name/path of the layout we descend into.
def rfm2.ui.widgets.register_condvis_pages | ( | ntype, | |
pnames, | |||
func = None |
|||
) |
Recursively parse the editor layout to store layouts affected by conditional visibility. Args: ntype (str) -- the node type pnames (str) -- list of page labels with conditional visibility. Kwargs: func (functions pointer) -- A function to be evaluated once we're done. (default: None)
def rfm2.ui.widgets.rfm_control | ( | ntype, | |
nattr, | |||
prefix = '' , |
|||
debug = False |
|||
) |
Implements a classic maya new/replace control workflow. Args: - ntype (str): node type - nattr (str): node dot attribute - prefix (str): a prefix appended to the control name. - debug (bool): display debug messages. Returns: - None
def rfm2.ui.widgets.rfm_ext_control | ( | nattr | ) |
Creates an extension control.
def rfm2.ui.widgets.rfm_node_help | ( | ntype | ) |
Create a widget displaying a node's help. Arguments: ntype {str} -- the node's type.
def rfm2.ui.widgets.rfm_ui_templates | ( | ) |
define UI templates for consistant visual tweaks
def rfm2.ui.widgets.set_rfm_stylesheet | ( | root | ) |
Tweak the Qt stylesheet of some controls to match Maya's. Arguments: root {str} -- name of the control
def rfm2.ui.widgets.setup_control | ( | ui_class, | |
desc, | |||
param, | |||
ctlname, | |||
nodeattr | |||
) |
setup a control's layout and contents. Arguments: ui_class {obj} -- instance of the class used to generate the widget desc {RfmNodeDesc} -- The node's description param {NodeDescParam} -- The parameters's description ctlname {str} -- the control's name nodeattr {str} -- the plug controled by this widget
def rfm2.ui.widgets.update_page_visibility | ( | nodeattr, | |
retry = False |
|||
) |
Update conditional visibility of pages. We get the list of pages with conditional visibility expressions and then evaluate their expressions in turn. Page layouts are referenced by names and will be renamed to match the canonical format if need be. In practice, it means the renaming will happen the very first time a node is displayed in the Attribute Editor. Args: - nodeattr (str): the full plug, i.e. 'filter1.msg'
dictionary rfm2.ui.widgets.CONDVIS_PAGES = {} |
rfm2.ui.widgets.long = int |
string rfm2.ui.widgets.RGSTYLESHEET |
list rfm2.ui.widgets.SPECIAL_WIDGETS |
dictionary rfm2.ui.widgets.WIDGET_CLASS |