rfm2
22.0
A python-based rewrite of RenderMan for Maya
|
Public Member Functions | |
def | __init__ (self, name=None, parent=None, syntax=None, fontSize=None, nattr=None) |
def | __del__ (self) |
def | createUI (self) |
def | setText (self, text) |
def | getText (self) |
def | on_attr_changed (self) |
def | setNodeAttr (self, nattr) |
def | setDirty (self) |
def | setClean (self) |
def | eventFilter (self, obj, event) |
def | focusOutEvent (self, event) |
def | focusInEvent (self, event) |
def | highlightCurrentLine (self) |
def | lineNumberAreaWidth (self) |
def | updateLineNumberAreaWidth (self) |
def | updateLineNumberArea (self, rect, dy) |
def | resizeEvent (self, event) |
def | lineNumberAreaPaintEvent (self, event) |
Public Attributes | |
nattr | |
dirty | |
script_job | |
syntax | |
font_size | |
qfont | |
line_number_area | |
ui | |
ctlname | |
cursor_pos | |
focus_stolen | |
mod_down | |
line_bg_color | |
clean_palette | |
dirty_palette | |
highlighter | |
Multi-line Maya text editor with configurable syntax highlighting.
def rfm2.ui.script_editor.ScriptEditor.__init__ | ( | self, | |
name = None , |
|||
parent = None , |
|||
syntax = None , |
|||
fontSize = None , |
|||
nattr = None |
|||
) |
def rfm2.ui.script_editor.ScriptEditor.__del__ | ( | self | ) |
def rfm2.ui.script_editor.ScriptEditor.createUI | ( | self | ) |
Build the widget.
def rfm2.ui.script_editor.ScriptEditor.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.script_editor.ScriptEditor.focusInEvent | ( | self, | |
event | |||
) |
Event handler called when this widgets receives the focus. We redefine it to restore the previous cursor position when the focus was stolen by the hypershade.
def rfm2.ui.script_editor.ScriptEditor.focusOutEvent | ( | self, | |
event | |||
) |
Re-implements qtw.QWidget.focusOutEvent(). Will be called when the widget looses focus. This will be our signal to save a dirty buffer.
def rfm2.ui.script_editor.ScriptEditor.getText | ( | self | ) |
Return the contents of the editor
def rfm2.ui.script_editor.ScriptEditor.highlightCurrentLine | ( | self | ) |
Highlight the current line on cursorPositionChanged event.
def rfm2.ui.script_editor.ScriptEditor.lineNumberAreaPaintEvent | ( | self, | |
event | |||
) |
Write the line numbers in the line number area.
def rfm2.ui.script_editor.ScriptEditor.lineNumberAreaWidth | ( | self | ) |
Return the width in pixels of the line number area, taking the current font into account
def rfm2.ui.script_editor.ScriptEditor.on_attr_changed | ( | self | ) |
method called by scriptJobs to refresh the editor's contents.
def rfm2.ui.script_editor.ScriptEditor.resizeEvent | ( | self, | |
event | |||
) |
Handle line number updating on rezise event.
def rfm2.ui.script_editor.ScriptEditor.setClean | ( | self | ) |
Clear the disty flag and re-instate the clean palette.
def rfm2.ui.script_editor.ScriptEditor.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.script_editor.ScriptEditor.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.script_editor.ScriptEditor.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.script_editor.ScriptEditor.updateLineNumberArea | ( | self, | |
rect, | |||
dy | |||
) |
General updating routine for the line number area
def rfm2.ui.script_editor.ScriptEditor.updateLineNumberAreaWidth | ( | self | ) |
Set the usable bounding box of the widget to avoid overlapping with the line number area.
rfm2.ui.script_editor.ScriptEditor.clean_palette |
rfm2.ui.script_editor.ScriptEditor.ctlname |
rfm2.ui.script_editor.ScriptEditor.cursor_pos |
rfm2.ui.script_editor.ScriptEditor.dirty |
rfm2.ui.script_editor.ScriptEditor.dirty_palette |
rfm2.ui.script_editor.ScriptEditor.focus_stolen |
rfm2.ui.script_editor.ScriptEditor.font_size |
rfm2.ui.script_editor.ScriptEditor.highlighter |
rfm2.ui.script_editor.ScriptEditor.line_bg_color |
rfm2.ui.script_editor.ScriptEditor.line_number_area |
rfm2.ui.script_editor.ScriptEditor.mod_down |
rfm2.ui.script_editor.ScriptEditor.nattr |
rfm2.ui.script_editor.ScriptEditor.qfont |
rfm2.ui.script_editor.ScriptEditor.script_job |
rfm2.ui.script_editor.ScriptEditor.syntax |
rfm2.ui.script_editor.ScriptEditor.ui |