Hey guys,
I have recently started to work some in Maya again and this time i have decided to really get into scripting. The problem is that work take so much time that i dont have time to learn mel. Does anyone here on Polycount have time for a small script ? A even better solution whould be if someone knows/can create a script that makes it really easy to map a mel file or command to a button on a floating window (when i say window i mean like ninja uv/deos toll etc.) I have made custom hotkeys already wich speed up my workflow alot but i feel i need a extra window with some tools in it. The idea is to hide all UI in maya and only have a box and the shortcuts as help. I really need help with this ! Anyone please ?
Replies
http://www.creativecrash.com/tutorials/using-qt-designer-for-mel-interfaces/page1
http://www.creativecrash.com/tutorials/maya-mel-qt-and-you-interfacing-with-the-qt-designer
+1 Qt is a dream to work with and does a massive amount of the work for you.
if your learning python in maya i would go straight to 'pymel', reason being is that the Autodesk wrapper is a bit crap, it forces you to write python like you would mel.. which is pretty dumb.
http://code.google.com/p/pymel/ it should also be installed in recent versions of maya by default.
:thumbup: Get Eclipse set up with auto completion and Maya Connection and pretty much get awesome
http://www.christianakesson.com/blog/?p=111
[ame]http://www.youtube.com/watch?v=tKTZoB2Vjuk[/ame]
+1 to eclipse. its a fantastic piece of software.
Cool man will look for it thanks alot.
How can i attach the commands that i need to buttons inside QT designer ?
Next to the dyanamic property is a text label that you can enter you enter your commands in. Also wondering why merge vertices, delete history are checkboxes? Would be better to make them buttons
"
No Command works. I have copied the command directly from Maya so it should work. When i press the button nothing happends (nothing comes up in the script window even with echo turned on. what am i doing wrong here ? "
Like this ? , still doesnt work nothing comes up in the maya script window,nothing happens.
Maya sources the ui's at startup I believe so if you've changed the ui and save it then it wont recognize it, so rehash helps there. I have it exactly laid out like that and works on my side.
Also is your ui stored in your scripts directory/ie where you saved it to?
This message show up when i run the script the first time:
string $scriptsDirectory = `internalVar -usd`; //load the ui file
string $testwindow = `loadUI -uiFile ($scriptsDirectory+"/test.ui")`;
//show the window
showWindow $testwindow;
button -e -c "TabWidget14|Tab|pushButton_27";
// Error: No object name specified. //
My Script is saved here: C:\Users\jimmy\Documents\maya\2012-x64\scripts
you wanna take a look at the file ? can i send it to you ?
Thanks man i got i to work now !!! , Just a few more:
1. How to i make a small button with an icon ? I have tried the "Tool button"
but cant find where to select iconfile. Also it doesnt work.
2. Is it possible to change colors on the buttons ?
3. How can link another script to a button (another file)
Thanks alot man !
2.Stylesheet ->background-color
3.no clue, Maya+QT is not my speciality,sorry
need to turn on echo all commands to see it.
The way I know QT works for mel is that it looks within the functions created in the script as mel but you might be able to link stuff if you know the path. Sorry I didnt reply to your message, been busy at work.