rfm2  22.0
A python-based rewrite of RenderMan for Maya
rfm2.ui.base_widget.BaseWidget Class Reference
+ Inheritance diagram for rfm2.ui.base_widget.BaseWidget:
+ Collaboration diagram for rfm2.ui.base_widget.BaseWidget:

Public Member Functions

def __init__ (self)
 
def ui_create (self)
 
def ui_update (self)
 
def setup (self, desc, param, uiprefix)
 
def create (self, ctlname, nodeattr, param, idx=None, dyn=False, struct_name=None, struct_idx=None)
 
def update (self, ctlname, nodeattr, idx=None, label=None, dyn=0, struct_name=None, struct_idx=None)
 
def conditional_visibility (self, return_func=False)
 
def add_param_popup_menu (self)
 
def create_navigation_popup (self, ctl)
 
def update_navigation_popup (self, ctl, func)
 
def __str__ (self)
 

Static Public Member Functions

def build_navigation_popup_menu (*args, **kwargs)
 

Public Attributes

 nattr
 
 label
 
 ctl
 
 widget
 
 desc
 
 param
 
 uiprefix
 
 ui_func
 
 ui_has_builtin_connector
 
 maya_func
 
 maya_sub_control
 
 parent
 

Static Public Attributes

list indexTwoTypes = [kk.W_POPUP, kk.W_MAPPER, kk.W_BOOLEAN, kk.W_CHECKBOX]
 

Detailed Description

Base class for all widgets.
This will handle the classic create/update cycle of maya controls, as well
as provide a base implementation for widgets attached to simple scalar
attributes.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ __str__()

def rfm2.ui.base_widget.BaseWidget.__str__ (   self)
+ Here is the caller graph for this function:

◆ add_param_popup_menu()

def rfm2.ui.base_widget.BaseWidget.add_param_popup_menu (   self)
Attach a popupMenu to the parameter widget to revert to the default
value, apply presets, etc.
This is menu will be triggered by a left-click on the label.
+ Here is the caller graph for this function:

◆ build_navigation_popup_menu()

def rfm2.ui.base_widget.BaseWidget.build_navigation_popup_menu ( args,
**  kwargs 
)
static
Create the popup menu attached to a attrNavigationField control
+ Here is the call graph for this function:

◆ conditional_visibility()

def rfm2.ui.base_widget.BaseWidget.conditional_visibility (   self,
  return_func = False 
)
Evaluate conditional visibility and attach a callback to trigger a
refresh if need be.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

def rfm2.ui.base_widget.BaseWidget.create (   self,
  ctlname,
  nodeattr,
  param,
  idx = None,
  dyn = False,
  struct_name = None,
  struct_idx = None 
)
A generic implementation of the widget creation phase.
Inherited by all widget types.
+ Here is the call graph for this function:

◆ create_navigation_popup()

def rfm2.ui.base_widget.BaseWidget.create_navigation_popup (   self,
  ctl 
)
Only create the navigation popupMenu, not its contents.
+ Here is the call graph for this function:

◆ setup()

def rfm2.ui.base_widget.BaseWidget.setup (   self,
  desc,
  param,
  uiprefix 
)
initial setup phase called before the create/update cycle.

Reimplemented in rfm2.ui.common.StringWidget, rfm2.ui.common.ColorWidget, and rfm2.ui.common.NumericalWidget.

◆ ui_create()

def rfm2.ui.base_widget.BaseWidget.ui_create (   self)
Create the widget compatible with your data types.

Reimplemented in rfm2.ui.user_attrs.UserAttrWidget, rfm2.ui.custom_widgets.AbcManifestWidget, rfm2.ui.custom_widgets.OSLEditorWidget, rfm2.ui.custom_widgets.AOVEditorWidget, rfm2.ui.custom_widgets.NodeEditorWidget, rfm2.ui.common.MessageWidget, rfm2.ui.common.MatrixWidget, rfm2.ui.common.StringWidget, rfm2.ui.common.ColorWidget, rfm2.ui.common.Numerical2Widget, and rfm2.ui.common.NumericalWidget.

+ Here is the caller graph for this function:

◆ ui_update()

def rfm2.ui.base_widget.BaseWidget.ui_update (   self)
Connect the widget previously created to a specific attribute.
We also handle conditional visibility here.

Reimplemented in rfm2.ui.user_attrs.UserAttrWidget, rfm2.ui.custom_widgets.AbcManifestWidget, rfm2.ui.custom_widgets.OSLEditorWidget, rfm2.ui.custom_widgets.AOVEditorWidget, rfm2.ui.custom_widgets.NodeEditorWidget, rfm2.ui.common.MessageWidget, rfm2.ui.common.MatrixWidget, rfm2.ui.common.StringWidget, rfm2.ui.common.ColorWidget, rfm2.ui.common.Numerical2Widget, and rfm2.ui.common.NumericalWidget.

+ Here is the caller graph for this function:

◆ update()

def rfm2.ui.base_widget.BaseWidget.update (   self,
  ctlname,
  nodeattr,
  idx = None,
  label = None,
  dyn = 0,
  struct_name = None,
  struct_idx = None 
)
A generic implementation of the widget updating phase.
Inherited by all widget types.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_navigation_popup()

def rfm2.ui.base_widget.BaseWidget.update_navigation_popup (   self,
  ctl,
  func 
)
Attach a function to the popupMenu to populate it.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ ctl

rfm2.ui.base_widget.BaseWidget.ctl

◆ desc

rfm2.ui.base_widget.BaseWidget.desc

◆ indexTwoTypes

list rfm2.ui.base_widget.BaseWidget.indexTwoTypes = [kk.W_POPUP, kk.W_MAPPER, kk.W_BOOLEAN, kk.W_CHECKBOX]
static

◆ label

rfm2.ui.base_widget.BaseWidget.label

◆ maya_func

rfm2.ui.base_widget.BaseWidget.maya_func

◆ maya_sub_control

rfm2.ui.base_widget.BaseWidget.maya_sub_control

◆ nattr

rfm2.ui.base_widget.BaseWidget.nattr

◆ param

rfm2.ui.base_widget.BaseWidget.param

◆ parent

rfm2.ui.base_widget.BaseWidget.parent

◆ ui_func

rfm2.ui.base_widget.BaseWidget.ui_func

◆ ui_has_builtin_connector

rfm2.ui.base_widget.BaseWidget.ui_has_builtin_connector

◆ uiprefix

rfm2.ui.base_widget.BaseWidget.uiprefix

◆ widget

rfm2.ui.base_widget.BaseWidget.widget

The documentation for this class was generated from the following file: