Another option to consider is to make your own window with say a custom
toolbar at the top and then try to embed the UV editor into another Qt
layout.
I've done this before to embed a simplified graph editor into a a character
finaling tool. I don't know about the UV editor but with the graphEditor
all I got from cmds was just the graph widget and nothing else. Thus I was
left with the laborious task of recreating the graphEdior tool bar.
On Tuesday, February 28, 2017 at 2:14:11 PM UTC-5, I73 wrote:
>
> Hey Kyle, thanks for the reply! I'm using C++ but looking at the python it
> seems I can use this example. I'm just glad its not using cmds and actually
> QT!!! I'll post my working code to help others out.
>
>
> On Tuesday, February 28, 2017 at 5:57:04 AM UTC-8, Kyle Burris wrote:
>>
>> This is a total hack, but it might get you started. You can use the lsUI
>> command to find any existing maya UI element. From there you can use sip,
>> and open maya to get a qtLayout from a maya layout. I don't fully
>> understand the sip line, it was taken from some code I wrote several years
>> ago. If you're using pyside then I believe you have to use shiboken instead
>> of sip. I would prepare yourself for a lot of tedious hacking and
>> restarting of maya.
>>
>> import sip
>> import PyQt4.QtGui as QtGui
>> import PyQt4.QtCore as QtCore
>> import maya.OpenMayaUI as omui
>>
>> print cmds.lsUI(ed=True)
>> parentLayout = cmds.editor('polyTexturePlacementPanel1', q=True, p=True)
>> uvLayout = sip.wrapinstance(long(omui.MQtUtil.findLayout(parentLayout)),
>> QtCore.QObject)
>> uvLayout = uvLayout.children()[0].layout()
>> qtButton = QtGui.QPushButton('TEST')
>> uvLayout.addWidget(qtButton)
>>
>>
>>
>> On Tuesday, February 14, 2017 at 7:37:09 PM UTC-5, I73 wrote:
>>>
>>> I'm looking for a way to override the UV editor window to add my own
>>> buttons and fields. Is there any way I can do this in QTpython? Or
>>> suggestions?
>>>
>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/bae6401e-3dfb-45c0-8cf4-31aa6bb04af7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.