rfm2
22.0
A python-based rewrite of RenderMan for Maya
|
Public Member Functions | |
def | __init__ (self, name=None, **kwargs) |
def | showSubstitutedString (self) |
def | setText (self, text) |
def | getText (self) |
def | on_attr_changed (self) |
def | on_node_name_changed (self) |
def | setNodeAttr (self, nattr) |
def | setupScriptJobs (self, retry=False) |
def | updateExpressionButton (self) |
def | setDirty (self) |
def | setClean (self) |
def | setAttr (self) |
def | eventFilter (self, obj, event) |
def | focusOutEvent (self, event) |
def | focusInEvent (self, event) |
def | keyPressEvent (self, event) |
def | scrollContentsBy (self, *args) |
def | contextMenuEvent (self, event) |
def | set_change_cmd (self, closure) |
Static Public Attributes | |
string | DEFAULT_SYNTAX = 'filepath' |
Replacement for maya's textFieldGrp control.
def rfm2.ui.text_field.TextField.__init__ | ( | self, | |
name = None , |
|||
** | kwargs | ||
) |
def rfm2.ui.text_field.TextField.contextMenuEvent | ( | self, | |
event | |||
) |
Create a contextual menu to display/insert tokens in the field.
def rfm2.ui.text_field.TextField.eventFilter | ( | self, | |
obj, | |||
event | |||
) |
The whole purpose of this event filter is to prevent focus stealing when the widget is in the HyperShade. See code for more infos.
def rfm2.ui.text_field.TextField.focusInEvent | ( | self, | |
event | |||
) |
Called when the widget gets focus.
def rfm2.ui.text_field.TextField.focusOutEvent | ( | self, | |
event | |||
) |
Re-implements QWidget.focusOutEvent(). Will be called when the widget looses focus. This will be our signal to save a dirty buffer. NOTE: we have to save the cursor position on focusOut, as the focus is lost when the contectual menu is displayed and somehow the cursor position is incorrectly reset to 0. To avoid this, we save it here and re-position it in contextMenuEvent().
def rfm2.ui.text_field.TextField.getText | ( | self | ) |
Return the contents of the editor
def rfm2.ui.text_field.TextField.keyPressEvent | ( | self, | |
event | |||
) |
Called when a key is pressed.
def rfm2.ui.text_field.TextField.on_attr_changed | ( | self | ) |
Update the text field anytime the connected attribute changes.
def rfm2.ui.text_field.TextField.on_node_name_changed | ( | self | ) |
update the plug name, assuming the uuid hasn't changed, and update the scriptJobs
def rfm2.ui.text_field.TextField.scrollContentsBy | ( | self, | |
* | args | ||
) |
disable scrolling and ask the underlying document to redraw. This will force a refresh of the whole line instead of just a few characters around the cursor.
def rfm2.ui.text_field.TextField.set_change_cmd | ( | self, | |
closure | |||
) |
Set a command to be executed when the field's contents changes.
def rfm2.ui.text_field.TextField.setAttr | ( | self | ) |
Set the connected attribute to the field's value.
def rfm2.ui.text_field.TextField.setClean | ( | self | ) |
Clear the dirty flag and re-instate the clean palette.
def rfm2.ui.text_field.TextField.setDirty | ( | self | ) |
Marks the contents of the editor as dirty so we know it should be saved next time it looses focus.
def rfm2.ui.text_field.TextField.setNodeAttr | ( | self, | |
nattr | |||
) |
Associate the editor with a specific node attr and sets the editor value to the attribute's current value.
def rfm2.ui.text_field.TextField.setText | ( | self, | |
text | |||
) |
sets the content of the editor to text. If the editor is associated to a node attribute, the contents will not be saved to the attribute.
def rfm2.ui.text_field.TextField.setupScriptJobs | ( | self, | |
retry = False |
|||
) |
cleanup old script jobs if need be and create new ones to check if an attribute changes or the node gets renamed. If the job cleanup fails, the retry flag will be used to try again on the next idle event.
def rfm2.ui.text_field.TextField.showSubstitutedString | ( | self | ) |
Toggle between the original string and the substituted version, based on the preview button's state.
def rfm2.ui.text_field.TextField.updateExpressionButton | ( | self | ) |
Shows/hides the button based on the existence of a string match.
rfm2.ui.text_field.TextField.blockDirty |
rfm2.ui.text_field.TextField.change_cmd |
rfm2.ui.text_field.TextField.ctlname |
rfm2.ui.text_field.TextField.cursor_anchor |
rfm2.ui.text_field.TextField.cursor_pos |
|
static |
rfm2.ui.text_field.TextField.dirty |
rfm2.ui.text_field.TextField.expr |
rfm2.ui.text_field.TextField.fileName |
rfm2.ui.text_field.TextField.focus_stolen |
rfm2.ui.text_field.TextField.highlighter |
rfm2.ui.text_field.TextField.label |
rfm2.ui.text_field.TextField.labelWidth |
rfm2.ui.text_field.TextField.last_node_uuid |
rfm2.ui.text_field.TextField.mod_down |
rfm2.ui.text_field.TextField.nattr |
rfm2.ui.text_field.TextField.previewButton |
rfm2.ui.text_field.TextField.previous_text |
rfm2.ui.text_field.TextField.scriptJob |
rfm2.ui.text_field.TextField.syntax |