Kamil
The UI class is Ui_AddPlayblast.py. The set title line looks like this
AddPlayblast.setWindowTitle(QtGui.QApplication.translate("AddPlayblast",
"Manual Add Playblast", None, QtGui.QApplication.UnicodeUTF8))
I tried using both "AddPlayblast" and "Manual Add Playblast" to no avail.
Is there anything else I should try?
Kurian - the UI script will be run exclusively in Maya. As I understand,
the __name__ = __main__ only works if you run the py file
directly? Initally I'm launching the UI with these commands
app = QtGui.QApplication(sys.argv)
myapp = AddPlayblast()
myapp.show()
sys.exit(app.exec_())
I tested it out in another function, and it is this line that freezes Maya
myapp = AddPlayblast()
best regard,
Panupat C.
On Mon, Jan 9, 2012 at 7:04 PM, Kurian O.S <[email protected]> wrote:
> you can use
>
> class MyApp (QApplication):
> ....
>
> if __name__ == '__main__':
> app = MyApp( sys.argv)
> if app.isRunning():
> ... do whatevr u want
>
>
> On Mon, Jan 9, 2012 at 5:30 PM, Ricardo Viana <[email protected]>wrote:
>
>> Humm. It should. Check you have your naming right on the .ui for window
>> widget.
>>
>> Best regards
>> Ricardo Viana
>>
>> On Jan 9, 2012, at 11:56 AM, Panupat Chongstitwattana <[email protected]>
>> wrote:
>>
>> Hi Kamil.
>>
>> Thanks for suggestion. But the cmds deleteUI/window modules can't seem to
>> detect the PyQt window's titles :(
>>
>>
>> On Mon, Jan 9, 2012 at 5:31 PM, Kamil Hepner <[email protected]>wrote:
>>
>>> It's very simple:
>>>
>>>
>>> winName = "myWindow"
>>> if pm.windows.window(winName, exists=True):
>>> pm.windows.deleteUI(winName)
>>>
>>>
>>> 2012/1/9 Panupat Chongstitwattana <[email protected]>
>>>
>>>> In Maya 2010, if I run the script to start a UI that is already
>>>> running, it would crash Maya D: How can I check if the UI is already
>>>> running and close it?
>>>>
>>>> --
>>>> view archives: http://groups.google.com/group/python_inside_maya
>>>> change your subscription settings:
>>>> http://groups.google.com/group/python_inside_maya/subscribe
>>>>
>>>
>>> --
>>> view archives: http://groups.google.com/group/python_inside_maya
>>> change your subscription settings:
>>> http://groups.google.com/group/python_inside_maya/subscribe
>>>
>>
>> --
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>> --
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>
>
>
> --
> --:: Kurian ::--
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe