Re: [Maya-Python] some problem with PyQt setStyleSheet and QSql database connection

2012-01-25 Thread David Moulder
I think you miss understood my reply. I'll try to clarify a little more. In your code example you did... app = QApplication.instance() pumpThread.initializePumpThread() app.setStyleSheet(setQtCSS()) *app* is in your *current *namespace. So if pumpThread hasn't been run once *app *will be None

Re: [Maya-Python] some problem with PyQt setStyleSheet and QSql database connection

2012-01-25 Thread Panupat Chongstitwattana
David - thank you for the clarification. I think you're right, re-reading pumpThread I realized it's initializing QApplication in it. Your solution to call it before starting the instance should work. Thank you very much :) best regard, Panupat C. On Wed, Jan 25, 2012 at 5:26 PM, David

[Maya-Python] python __main__ class

2012-01-25 Thread m.dresch...@bigpoint.net
Hi, I have a question regarding the storage of data in Maya that should be available in all my python scripts. I found the __main__ class and added an (immutable) variable to it in the userSetup.py file. With this setup I can access the variable in all my scripts. Do some of you guys have

[Maya-Python] array of pointers?

2012-01-25 Thread smb3d
Ultimately I'm trying to create a scatter script. I'm using the mfnMesh.getPointAtUV to get a world position from U,V values on a surface. When I use a single float2 pointer it works great. The problem is that I want to generate an array of random U,V values and iterate through this to find the

Re: [Maya-Python] Using Maya's color scheme on stand alone PyQt apps?

2012-01-25 Thread zhang jian
You should use style/styleSheet to your app, zhang On Sun, Jan 22, 2012 at 11:36 AM, Panupat Chongstitwattana panup...@gmail.com wrote: Is there a way to do this? I'm thinking about the nice dark color scheme of Maya 2011+. -- view archives:

Re: [Maya-Python] python __main__ class

2012-01-25 Thread Justin Israel
I think that __main__ would be a very strange and unpredictable place to store shared data in your environment. If what you are after is a globals module to share settings, you could try something like this ## testConstants.py ## BAR=foo ## testScriptA.py ## import testConstants print BAR=,

Re: [Maya-Python] python __main__ class

2012-01-25 Thread Judah Baron
Additionally, and this might not apply to your situation until you have more of a system in place but, many of the constants that you might be interested in are best stored in some modular context. That is, you may have a number of settings that really belong in your export package, for instance.

Re: [Maya-Python] python __main__ class

2012-01-25 Thread Justin Israel
+1 on that, Judah. Storing them in the __init__.py really does offer an excellent way to organize by scope. On Wed, Jan 25, 2012 at 2:03 PM, Judah Baron judah.ba...@gmail.com wrote: Additionally, and this might not apply to your situation until you have more of a system in place but, many of