rfm2  22.0
A python-based rewrite of RenderMan for Maya
rfm2.ui.text_field Namespace Reference

Classes

class  Highlighter
 
class  PathHighlighter
 
class  LpeHighlighter
 
class  ExpressionPreviewButton
 
class  TextField
 

Functions

def unique_ctl_name (name, func)
 
def sanitize_ptr_table ()
 
def unique_obj_name (name)
 
def rfm_text_field (name, **kwargs)
 
def test ()
 

Variables

dictionary PTR_TABLE = {}
 
 BACKGROUND_COLOR = qtg.QColor(43, 43, 43)
 
 BLUE = qtg.QColor(41, 172, 255)
 
 ORANGE = qtg.QColor(252, 151, 31)
 
 GREEN = qtg.QColor(167, 226, 46)
 
 YELLOW = qtg.QColor(230, 219, 116)
 
 RED = qtg.QColor(245, 245, 41)
 
 PURPLE = qtg.QColor(182, 126, 255)
 
 GREY = qtg.QColor(128, 128, 128)
 
list IGNORED_KEY_EVENTS = [qtc.Qt.Key_Return, qtc.Qt.Key_Enter]
 
int FIELD_HEIGHT = 22
 
 LPE_TOKENS = OrderedDict()
 
list FOCUS_STEALERS
 
string kStringExprSample1 = '<ws>/images/<scene>/<scene>__<renderlayer>_<camera>.<f4>.exr'
 
string kStringExprSample2 = '/Users/plp/file.<udim>.tex'
 
tuple kStringExprSample3
 

Detailed Description

A Qt text field widget with syntax highlighting.

Function Documentation

◆ rfm_text_field()

def rfm2.ui.text_field.rfm_text_field (   name,
**  kwargs 
)
Mimic a classic maya command interface for our scriptEditor widget.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sanitize_ptr_table()

def rfm2.ui.text_field.sanitize_ptr_table ( )
Remove dead objects from PTR_TABLE.
Maya only holds the Qt objects, so we need to delete our instances if their
Qt object has been garbage-collected without our knowledge. Just test the
Qt object to check its validity.

◆ test()

def rfm2.ui.text_field.test ( )
Basic test harness
+ Here is the call graph for this function:

◆ unique_ctl_name()

def rfm2.ui.text_field.unique_ctl_name (   name,
  func 
)
Return a unique maya control name.

Arguments:
    name {str} -- candidate object name
    func {maya func} -- func to be queried for the control's existence.

Returns:
    str -- unique control name
+ Here is the caller graph for this function:

◆ unique_obj_name()

def rfm2.ui.text_field.unique_obj_name (   name)
Find the next unique name by incrementing a suffix.

Arguments:
    name {str} -- candidate name

Returns:
    str -- unique name

Variable Documentation

◆ BACKGROUND_COLOR

rfm2.ui.text_field.BACKGROUND_COLOR = qtg.QColor(43, 43, 43)

◆ BLUE

rfm2.ui.text_field.BLUE = qtg.QColor(41, 172, 255)

◆ FIELD_HEIGHT

int rfm2.ui.text_field.FIELD_HEIGHT = 22

◆ FOCUS_STEALERS

list rfm2.ui.text_field.FOCUS_STEALERS
Initial value:
1 = [
2  qtc.Qt.Key_Shift, qtc.Qt.Key_Control, qtc.Qt.Key_Meta, qtc.Qt.Key_Alt,
3  qtc.Qt.Key_AltGr
4 ]

◆ GREEN

rfm2.ui.text_field.GREEN = qtg.QColor(167, 226, 46)

◆ GREY

rfm2.ui.text_field.GREY = qtg.QColor(128, 128, 128)

◆ IGNORED_KEY_EVENTS

list rfm2.ui.text_field.IGNORED_KEY_EVENTS = [qtc.Qt.Key_Return, qtc.Qt.Key_Enter]

◆ kStringExprSample1

string rfm2.ui.text_field.kStringExprSample1 = '<ws>/images/<scene>/<scene>__<renderlayer>_<camera>.<f4>.exr'

◆ kStringExprSample2

string rfm2.ui.text_field.kStringExprSample2 = '/Users/plp/file.<udim>.tex'

◆ kStringExprSample3

tuple rfm2.ui.text_field.kStringExprSample3
Initial value:
1 = ('/Users/plp/Perforce/plp_hellhound17_rman_main/rat/apps'
2  '/rfm/scripts/rfm2/ui/text_field.py')

◆ LPE_TOKENS

rfm2.ui.text_field.LPE_TOKENS = OrderedDict()

◆ ORANGE

rfm2.ui.text_field.ORANGE = qtg.QColor(252, 151, 31)

◆ PTR_TABLE

dictionary rfm2.ui.text_field.PTR_TABLE = {}

◆ PURPLE

rfm2.ui.text_field.PURPLE = qtg.QColor(182, 126, 255)

◆ RED

rfm2.ui.text_field.RED = qtg.QColor(245, 245, 41)

◆ YELLOW

rfm2.ui.text_field.YELLOW = qtg.QColor(230, 219, 116)