Ok ... so thanks to everyone for the help ...
*Eric *... I did need to have (*args) in the function definition that shows
my window.
*Justin *... I did end up restructuring my window creation/parenting as
follows ...
def __init__(self, parent=None):
if parent is None:
Will this be recorded so we can watch it at another time?
As far as I know, yes.
On 16 February 2016 at 06:38, Deke Kincaid wrote:
> Will this be recorded so we can watch it at another time?
>
> On Mon, Feb 15, 2016 at 1:35 PM, Marcus Ottosson
Will this be recorded so we can watch it at another time?
On Mon, Feb 15, 2016 at 1:35 PM, Marcus Ottosson
wrote:
> Hi all,
>
> I'm hosting a webinar. :)
>
> Maybe you would like to join? It will be my first, and it will be about
> Pyblish and how it works in conjunction
Yes, it is reliable for me so far, and i should say that this will work in
nuke and houdini too.
i tested the code in script editor, and importing it in maya, it works. i
like to know maybe it run in maya and don't return maya main window as
active window?
let me know
On Tue, Feb 16, 2016 at 9:45
On Tue, Feb 16, 2016 at 6:27 PM Mahmoodreza Aarabi
wrote:
> Hey man i suggest that use this method for running your window in maya:
>
> class YourClass():
>
> def getMainWindow():
> mainWindow = QtGui.QApplication.activeWindow()
> while True:
>
Hey man i suggest that use this method for running your window in maya:
class YourClass():
def getMainWindow():
mainWindow = QtGui.QApplication.activeWindow()
while True:
lastWin = mainWindow.parent()
if lastWin:
mainWindow = lastWin
else:
very nice man
Good luck!
i will join
:)
On Tue, Feb 16, 2016 at 1:05 AM, Marcus Ottosson
wrote:
> Hi all,
>
> I'm hosting a webinar. :)
>
> Maybe you would like to join? It will be my first, and it will be about
> Pyblish and how it works in conjunction with ftrack, but
Hey man i suggest that use this method for running your window in maya:
class YourClass():
def getMainWindow():
mainWindow = QtGui.QApplication.activeWindow()
while True:
lastWin = mainWindow.parent()
if lastWin:
mainWindow = lastWin
else:
This rings a bell that I dealt with a few weeks back. I can't find any
emails or messages with a quick search but I believe there was some command
in maya in reference to the menus, where you have to pass *args, **kwargs
and it get's things working. Forget where though.
its getting called at the bottom of the script below the class ...
if __name__ == "__main__":
try:
test_ui.deleteLater()
except:
pass
test_ui = smRealCameras()
try:
test_ui.create()
test_ui.show()
except:
Where is the calling line where the dialog instance actually gets
constructed? Not the constructor itself.
Also, I think doing this (and I see it alot) might be a bad idea:
def __init__(self, parent=maya_main_window()):
Reason being that the default argument value is going to be evaluated once
Hi all,
I'm hosting a webinar. :)
Maybe you would like to join? It will be my first, and it will be about
Pyblish and how it works in conjunction with ftrack, but mostly about
publishing in general.
- https://www.ftrack.com/webinar
I'll probably include a few awkward silences and it might be a
Yes .. the menu call back is instantiating the the class. When I run the
script from the script editor or call it form the command line it runs fine.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from
I am passing the result of maya_main_window which is a result of
wrapInstance ... I thought I needed to do this in order to get Maya to be
the parent window .. otherwise my dialogs could fall behind Maya ... no ?
--
You received this message because you are subscribed to the Google Groups
The clue is in the exception stack. Your script, line 38 is the where
things are starting to go bad. You are creating and instance of your
dialog and passing in a boolean instance. True or False. It's also
telling you how the code is expected to be called.
You should be passing either None or
After moving the imports into the build section of my userSetup.py as you
suggested I was able to get the menu to appear in Maya ... but when I
attempted to run the script from the menu I got the following error in the
log window ...
// Error: 'PySide.QtGui.QDialog' called with wrong argument
I get this error in my script editor when I try to execute the script from
the menu after moving the lines you mentioned
// Error: 'PySide.QtGui.QDialog' called with wrong argument types:
# PySide.QtGui.QDialog(bool)
# Supported signatures:
# PySide.QtGui.QDialog(PySide.QtGui.QWidget =
thanks ... ill give that a try .. hey is there a way for me to resource
usersetup.py so I don have to quit and relaunch Maya to see my changes to
userSetup.py ?
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To
Looks like your error is in your create_cam_class.py file, not in your
userSetup.py, probably something in that file is trying to interact with
the GUI outside of your evalDeferred call.
You could probably try testing it by moving the import create_cam_class and
from_cam_class import
Hey Guys,
I am building my own Maya menu through userSetup.py ...
I have written another python script which is basically just a pySide
class. I want to call this script from the menu created in userSetup.py.
There is no main function .. just the class that gets instantiated at the
bottom of
Hey Guys,
I am building my own Maya menu through userSetup.py ...
I have written another python script which is basically just a pySide
class. I want to call this script from the menu created in userSetup.py.
There is no main function .. just the class that gets instantiated at the
bottom of
21 matches
Mail list logo