Maya 2017 中的父级窗口



我找到了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))

这是我更新的脚本:

import maya.cmds as cmds
import maya.OpenMayaUI as mui
from PySide2 import QtWidgets
import shiboken2
if cmds.window("GEW", exists=True): cmds.deleteUI("GEW", window=True) 
cmds.window( "GEW", title="Graph Editor +" )
cmds.paneLayout( configuration='single' )
cmds.scriptedPanel( type='graphEditor' )
cmds.columnLayout (adj=1)
cmds.floatSlider(min=0.1, max=1.0, v=0.7, dc=lambda x:ref(x))
cmds.showWindow("GEW")
GEQ = shiboken2.wrapInstance(long(mui.MQtUtil.findWindow( "GEW" )), QtWidgets.QWidget)
def ref(value): GEQ.setWindowOpacity(value)
GEQ.setWindowOpacity(0.7)

相关内容

  • 没有找到相关文章

最新更新