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
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
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
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
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:
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=,
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.
+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