缩放/放大用户界面或字体 maya 2017

Zoom / enlarge user interface or fonts maya 2017

我需要放大 Maya 的 UI,如图所示 here,因为字母和字体太小了。然而,问题是这个解决方案是基于 2016 版本的,该设置可能已针对最新版本进行了更改。 如何对 v.2017 做同样的事情?

可以通过修改应用程序包中的脚本来放大字体。

如果您使用的是Mac,请转到

/Applications/Autodesk/maya20xx/Maya.app/Contents/Resources

如果您使用的是Windows,请转到

C:\Program Files\Autodesk\Maya20xx\resources\MayaStrings

(其中 xx 是您的 Maya 副本的版本)

您需要先备份并使用编辑器编辑 MayaStrings,然后搜索并找到

// String set: s_TschemeResources

现在您所要做的就是相应地更改 os(mac 或 win)的字体大小的第一个数字。即:

s_TschemeResources.rBoldLabelFont_mac = "13,1,0,0,0,0,Lucida Grande" s_TschemeResources.rBoldLabelFont_win = "13,1,0,0,0,0,Tahoma"

不是全局 UI 答案,但如果您想更改特定 UI 元素的字体,您可以通过将样式表应用到特定元素来实现……举个例子,这是我用来设置我的脚本编辑器字体首选项的。

from PySide2 import QtWidgets

def set_script_editor_font(family   = 'Courier New', 
                           emphasis = 'normal', 
                           bg_color = 'normal',
                           size     = 12):
    
    """
    Usage: family:   The font's family, ex: Courier, Wingdings, etc...
           emphasis: The font's emphasis, ex: Bold, italic, etc... normal (default)
           bg_color: The font's background color, ex: black, white, etc... normal (default)
           size :    The font's size in pixels.
    """
    
    # find the MayaWindow widget
    app = QtWidgets.QApplication.instance()
    win = next(x for x in app.topLevelWidgets() if x.objectName()=='MayaWindow')

    # add a scriptEditor styleSheet to maya_ui
    win.setProperty('maya_ui', 'scriptEditor')
    styleSheet = '''
    QWidget[maya_ui="scriptEditor"] QTextEdit {
      font-family: "%s";
      font: %s %spx;
      background-color: %s;
    }
    ''' %(family, emphasis, size, bg_color)

    app.setStyleSheet(styleSheet)

    
# this is my current favorite
set_script_editor_font(family='Consolas', size=18) 

# use this if you code with a quill
set_script_editor_font(family='Lucida Handwriting')   

# use this if you're drunk
set_script_editor_font(family='Wingdings')