# script name : script_editor_fix.py
from maya import OpenMayaUI as omuifrom PySide2 import QtWidgetsfrom shiboken2 import wrapInstance
def get_maya_ui_element(ui_element): omui.MQtUtil.mainWindow() ptr = omui.MQtUtil.findControl(ui_element) widget = wrapInstance(long(ptr), QtWidgets.QWidget) return widget
def change_ui_font(ui_element): widget = get_maya_ui_element(ui_element)
widget.setStyleSheet( "font-family: {0}; font-weight: {1}; font-style: {2}; font-size: {3}px;".format( "FreeMono", "normal", "normal", 12 ) )
def main(): change_ui_font(ui_element="scriptEditorPanel1Window")
# script name : userSetup.pyfrom maya import cmdsimport script_editor_fix
cmds.evalDeferred("script_editor_fix.main()", lowestPriority=True)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f359fe16-c462-4f70-ae31-ef8e2ecd984f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.