I use Maya2014 + PyQt4. All my scripts are stored on the server. I have a paths:
## a place where all are read python scripts:
PYTHONPATH=X:\tools\Maya\windows\2014\python\
## a place for *.ui files:
# X:\tools\Maya\windows\2014\python\ui\
## a place for *.ico and *.png files:
XBMLANGPATH=X:\tools\Maya\windows\2014\icons\
When i run scripts from the maya python are no problems. But for download *.ui files i have to specify the full path:
form, base = uic.loadUiType('X:/tools/Maya/windows/2014/python/UI/lightSets.ui')
How i can load *.ui files automatically without specifying a full path? I have a lot of system variables and want to search in this file system paths. For example when i working in python without maya simply specify let 'ui/aaa.ui' and the file will be found as the starting point of the path is in the run python script and from subfolders and files already.
The second problem with the *.ui files. QtDesigner while maintaining creates such way to all the pictures:
<property name="icon">
<iconset>
<normaloff>../../icons/close_btn.png</normaloff>
../../icons/close_btn.png
</iconset>
</property>
And when i load this file in maya - she can not find a picture of this relative paths. I believe that the problem again in the same way that the starting set is not known where and relative already obtained from him wrong.
Now I have to specify the full path to all images, making it difficult to change paths and transfer scripts. In general, the direct path to all icons and resources, this is a bad way. Tell me how to use into python maya relative paths?
For example I want to use this base path:
X:/tools/Maya/windows/2014/python/
And then have simply indicate relative paths for all that load from this folder. How to do it?