fusedgore
07-15-2009, 04:13 AM
HI .First i am new to scripting and i had a few questions .When coding mel scripts i know you can put all your tools into a window like the code below .But my question is how do i change like the backround color of the window ,or add like a logo to the window .Or would it be possible to actually make the window outline like animated by changing colors .
This was a script i did for myself to launch cs2,cs3 and zbrush .I tried hilighting my problem areas .Thanks allot .I also been looking at the autodek help website and documentation but cant really seem to figure it out .
Also can someone point me in a direction to learn some advanced MEL or would it be better to move onto Python .
Thanks Allot
// Application designed to intergrate workflow by launching Applications of
//zbrush,cs2,cs3
proc launchProgram(int $choice){
if ($choice == 1)
{
system("start C:/Program Files (x86)/Adobe/Adobe Photoshop CS2/Photoshop.exe" ); //Launch Photoshop CS2
}
if ($choice == 2)
{
system("start C:/Program Files (x86)/Adobe/Adobe Photoshop CS3/Photoshop.exe " ); // Launch Photoshop CS3
}
if ($choice == 3)
{
system("start C:/Program Files (x86)/Pixologic/ZBrush3/ZBrush3.exe" ); //Launch Pixologic Zbrush
}
}
// Makes The Window
string $window = `window -rtf true -
title "External Workflow Widget By Shaun Keenan"
-bgc 0.5 1.0 _ this line dont seem to work - i am guessing this is for the button backround color ?
-sizeable 0
-widthHeight 100 200`;
// Define The Layout Of The Buttons In The Window
rowColumnLayout -numberOfRows 2
-rowHeight 1 50
-rowHeight 1 100;
symbolButton -image "cs2.xpm" -c "launchProgram(1)"; text -label "Launch Photoshop cs2";
symbolButton -image "cs3.xpm" -c "launchProgram(2)"; text -label "Launch Photoshop cs3";
symbolButton -image "ZBrush.xpm" -c "launchProgram(3)"; text -label "Launch Pixologic ZBrush";
showWindow $window;
This was a script i did for myself to launch cs2,cs3 and zbrush .I tried hilighting my problem areas .Thanks allot .I also been looking at the autodek help website and documentation but cant really seem to figure it out .
Also can someone point me in a direction to learn some advanced MEL or would it be better to move onto Python .
Thanks Allot
// Application designed to intergrate workflow by launching Applications of
//zbrush,cs2,cs3
proc launchProgram(int $choice){
if ($choice == 1)
{
system("start C:/Program Files (x86)/Adobe/Adobe Photoshop CS2/Photoshop.exe" ); //Launch Photoshop CS2
}
if ($choice == 2)
{
system("start C:/Program Files (x86)/Adobe/Adobe Photoshop CS3/Photoshop.exe " ); // Launch Photoshop CS3
}
if ($choice == 3)
{
system("start C:/Program Files (x86)/Pixologic/ZBrush3/ZBrush3.exe" ); //Launch Pixologic Zbrush
}
}
// Makes The Window
string $window = `window -rtf true -
title "External Workflow Widget By Shaun Keenan"
-bgc 0.5 1.0 _ this line dont seem to work - i am guessing this is for the button backround color ?
-sizeable 0
-widthHeight 100 200`;
// Define The Layout Of The Buttons In The Window
rowColumnLayout -numberOfRows 2
-rowHeight 1 50
-rowHeight 1 100;
symbolButton -image "cs2.xpm" -c "launchProgram(1)"; text -label "Launch Photoshop cs2";
symbolButton -image "cs3.xpm" -c "launchProgram(2)"; text -label "Launch Photoshop cs3";
symbolButton -image "ZBrush.xpm" -c "launchProgram(3)"; text -label "Launch Pixologic ZBrush";
showWindow $window;
