Re: [Maya-Python] How to embed a modelPanel into a Qt Layout

2011-11-21 Thread Justin Israel
Ok great. Thats good to know. Pyqt 4.6 is slightly older than the maya 2011 docs even suggest (they recommend 4.7.3) so as Jo pointed out in his link its probably a keyword arg compatibility issue. On Nov 20, 2011, at 11:56 PM, Kurian O.S kuria...@gmail.com wrote: Yeah Justin thats what

Re: [Maya-Python] How to embed a modelPanel into a Qt Layout

2011-11-20 Thread Justin Israel
Hah, ya I had a feeling. Now that I am home, I was able to write out an example: https://gist.github.com/1381489 Its more complicated because you have to use sip and the MQtUtil function to translate between maya node paths, and QObjects/QWidgets Here is what the script is doing: 1. Create the

Re: [Maya-Python] How to embed a modelPanel into a Qt Layout

2011-11-20 Thread Panupat Chongstitwattana
Wow Justin. Thanks for showing us that example. It's great reference. Do you cover that in your cmiVFX tutorial too? Panupat C. On Mon, Nov 21, 2011 at 10:07 AM, Justin Israel justinisr...@gmail.com wrote: Hah, ya I had a feeling. Now that I am home, I was able to write out an example:

Re: [Maya-Python] How to embed a modelPanel into a Qt Layout

2011-11-20 Thread Kurian O.S
Hi Justin, thanks for the example man , this is so cool and when I try to run , I got this # Error: 'parent' is not a Qt property or a signal # Traceback (most recent call last): # File maya console, line 9, in module # File maya console, line 14, in __init__ # AttributeError: 'parent' is

Re: [Maya-Python] How to embed a modelPanel into a Qt Layout

2011-11-20 Thread jo benayoun
Hi Kurian, this version works here, I didn't try the justin's one, but the concept stays the same. its a dummy function, if you need to do more, make a class. import sip from PyQt4.QtGui import QMainWindow from PyQt4.QtGui import QWidget import maya.cmds as cmds from maya.OpenMayaUI import

Re: [Maya-Python] How to embed a modelPanel into a Qt Layout

2011-11-20 Thread Justin Israel
@Panupat Actually, no I don't go into this specifically in my PyQt chapter. You do however see the example of how to use sip and MQtUtil to get the reference to the Maya MainWindow. I was trying really hard not to cross a certain threshold of difficulty in my examples for that video, not to

Re: [Maya-Python] How to embed a modelPanel into a Qt Layout

2011-11-20 Thread jo benayoun
Hi Justin, Actually, I just wrote the function from scratch. Didn't try your implementation. Did it now. It works fine, for me on 2012 (don't have 2011 too). To be sure my code always run, I call baseclasses with the oldstyle and never make a use of keyword args (to be compatible with older

Re: [Maya-Python] How to embed a modelPanel into a Qt Layout

2011-11-20 Thread Kurian O.S
Yeah Justin thats what the issue , i updated with code like this def __init__(self, parent=None, **kwargs): super(MyDialog, self).__init__(parent, **kwargs) then its working and I am using 4.6 On Mon, Nov 21, 2011 at 1:08 PM, jo benayoun jobenay...@gmail.com wrote: Hi Justin,