[Maya-Python] parent ScriptJobs to a PyQT GUI in Maya

2011-04-20 Thread Shawn Patapoff
Hey, Has anyone found any other way to parent a scriptJob to a PyQt created GUI in maya without having to attach a maya created dummy object? This is what we're doing: dummyObj = cmds.helpLine(visible=False, width=100, parent='mainVerticalLayout') cmds.scriptJob( e=['SelectionChanged',

Re: [Maya-Python] parent ScriptJobs to a PyQT GUI in Maya

2011-04-20 Thread John Patrick
Could you override the closeEvent in whatever QWidget destroys the UI, and have it kill the scriptJob instead? On Wed, Apr 20, 2011 at 10:40 AM, Shawn Patapoff spatap...@bluecastlegames.com wrote: Hey, Has anyone found any other way to parent a scriptJob to a PyQt created GUI in maya

Re: [Maya-Python] parent ScriptJobs to a PyQT GUI in Maya

2011-04-20 Thread Shawn Patapoff
Hey John, That's a good idea, I think I'll look into that. Seems way cleaner. Thanks. On Wed, Apr 20, 2011 at 11:00 AM, John Patrick jspatr...@gmail.com wrote: Could you override the closeEvent in whatever QWidget destroys the UI, and have it kill the scriptJob instead? On Wed, Apr 20,

Re: [Maya-Python] parent ScriptJobs to a PyQT GUI in Maya

2011-04-20 Thread John Patrick
One thing I would worry about with that method is what happens in the case of an exception somewhere in the UI's __init__ after creating the scriptJob. This is overkill in this case (try/except would probably be just fine), but I'm a fan of contextManagers for this type of 'i really need to make

Re: [Maya-Python] parent ScriptJobs to a PyQT GUI in Maya

2011-04-20 Thread Shawn Patapoff
Hey John, Thanks a bunch for the recipe. Don't 100% understand it, but I'll look over it a bit more to get a better grasp. Pretty much just hacked it into what I was doing and all it working great. Thanks again, Shawn On Wed, Apr 20, 2011 at 11:54 AM, John Patrick jspatr...@gmail.com wrote: