我找到了一个 SAFRONOV 3D 的脚本(在 youtube 上),它允许他使图形编辑器在 Maya 中透明......问题是它适用于 Maya 2014,我正在尝试将其更新到 2017。
我对 opne maya 知之甚少,我是 pymel 的初学者,一些帮助会很棒。怎么了?:
import maya.cmds as cmds
import maya.OpenMayaUI as mui
import shiboken2
import maya.mel as mel
from PySide2 import QtGui
mel.eval('GraphEditor')
def getGraphEditor():
ptr2 = mui.MQtUtil.findLayout("graphEditor1Window|TearOffPane")
return shiboken2.wrapInstance(long(ptr2), QtGui.QWidget)
graphEditor = getGraphEditor()
graphEditor.setWindowOpacity(0.5)
def ref(value):
graphEditor.setWindowOpacity(value)
cmds.floatSlider(p="graphEditor1Window|TearOffPane|graphEditor", min = 0.1 , max = 1.0, v = 0.7, dc = lambda x:ref(x))