TiKiMoN
05-06-2003, 04:48 AM
This will probably probably be pretty simple, but I have a few questions about MEL UIs that I hope someone will be able to answer for me.
First of all, here is my code for my window thus far...
global proc davesavewindow() {
string $dswindow = "davesavewindow";
// if davesave window exists, delete it.
if (`window -exists $dswindow`) deleteUI $dswindow;
// now create new davesave window.
$dswindow = `window -title "davesave v-1.0" -mnb 1 -mxb 0 -bgc 0.0 0.0 0.0 -tlb 0 -rtf 1 -s 1 -wh 640 480 davesavewindow`;
// set working parent to be GUI window.
setParent davesavewindow;
// add column construct.
columnLayout -bgc 0.0 0.0 0.0 ColumnLayout;
// set working parent to columnLayout.
setParent davesavewindow|ColumnLayout;
// create a frame for the layout.
frameLayout -label "" -li 0 -lv 0 -cll 0 -bgc 0.0 0.0 0.0 -marginWidth 5 -marginHeight 5 -width 630 -height 460 FrameLayout;
// set working parent to columnLayout.
setParent davesavewindow|ColumnLayout;
// create a status bar.
textField -text "Ready" -editable false -width 630 -height 20 StatusLine;
string $sbarPath = "davesavewindow|ColumnLayout|StatusLine";
// finally, show GUI
showWindow davesavewindow;
}
Now this produces this window:
http://www.johnnysubway.com/~dave/images/davesavewindow.jpg
Why, if all of my background colors (-bgc) are set to black (0.0 0.0 0.0 for r g b respectively), is there a huge windows default block in the middle of my UI? I don't understand why that would happen.
Also, I have noticed a lot of -bgc modifiers for interface controls, but nothing about the font color (foreground color)... is it possible to set this as well? I couldn't imagine MEL would be so shortsided not to allow that.
One more question... I was wondering if it is possible to grab the names of all the cameras in the open Maya scene file. If so, can someone point me to the command that might do this?
Thanks for all of your help! :)
First of all, here is my code for my window thus far...
global proc davesavewindow() {
string $dswindow = "davesavewindow";
// if davesave window exists, delete it.
if (`window -exists $dswindow`) deleteUI $dswindow;
// now create new davesave window.
$dswindow = `window -title "davesave v-1.0" -mnb 1 -mxb 0 -bgc 0.0 0.0 0.0 -tlb 0 -rtf 1 -s 1 -wh 640 480 davesavewindow`;
// set working parent to be GUI window.
setParent davesavewindow;
// add column construct.
columnLayout -bgc 0.0 0.0 0.0 ColumnLayout;
// set working parent to columnLayout.
setParent davesavewindow|ColumnLayout;
// create a frame for the layout.
frameLayout -label "" -li 0 -lv 0 -cll 0 -bgc 0.0 0.0 0.0 -marginWidth 5 -marginHeight 5 -width 630 -height 460 FrameLayout;
// set working parent to columnLayout.
setParent davesavewindow|ColumnLayout;
// create a status bar.
textField -text "Ready" -editable false -width 630 -height 20 StatusLine;
string $sbarPath = "davesavewindow|ColumnLayout|StatusLine";
// finally, show GUI
showWindow davesavewindow;
}
Now this produces this window:
http://www.johnnysubway.com/~dave/images/davesavewindow.jpg
Why, if all of my background colors (-bgc) are set to black (0.0 0.0 0.0 for r g b respectively), is there a huge windows default block in the middle of my UI? I don't understand why that would happen.
Also, I have noticed a lot of -bgc modifiers for interface controls, but nothing about the font color (foreground color)... is it possible to set this as well? I couldn't imagine MEL would be so shortsided not to allow that.
One more question... I was wondering if it is possible to grab the names of all the cameras in the open Maya scene file. If so, can someone point me to the command that might do this?
Thanks for all of your help! :)
