slothuus
07-10-2007, 11:02 AM
hey guys
i made this custom shelf with saving out the buttons
and all that works fine...
but when i load it in and eval the script the the buttons
comes in the buttom of the layout... you can see it
if you try to run the script..
plz help
Best Regards
Nicolai Slothuus
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
if(`window -exists NsShelftwindow`)
deleteUI NsShelftwindow;
if( `windowPref -exists NsShelftwindow` )
windowPref -r NsShelftwindow;
window -w 300 -h 300 -t "NsShelftwindow"
-titleBar 1 -mnb 1 -mxb 1 -mb 1
-tlb 0 -sizeable 1 NsShelftwindow;
frameLayout -w 200 -l "Selction"
-la "top" -bs "in"
-cll 1 -cl 1 frameAnimSelcSet;
columnLayout -adj 1;
columnLayout -adj 1;
gridLayout
-cr 0 -aec 1 -ag 0
;
button -l "Save" -align "center"
-c "saveShelfButtom + ";
button -l "Selc" -align "center"
-c "selectToShelf";
button -l "Load" -align "center"
-c ("loadshelf");
setParent..;
setParent..;
NS_ShelfSelc;
setParent..;
setParent..;
setParent..;
columnLayout -adj 1;
button -l "Save" -align "center"
-c "saveShelfButtom + $run ";
//--------------------------------------------
//--------------------------------------------
//--------------------------------------------
global proc NS_ShelfSelc (){
columnLayout -adj 1;
shelfTabLayout -h 200
-image "smallTrash.xpm"
-imageVisible true mainShelfTab;
shelfLayout anim;
}
//--------------------------------------------
//--------------------------------------------
//--------------------------------------------
global proc saveShelfButtom(){
string $tempDir = `fileDialog -m 1`;
saveShelf anim ($tempDir + "");
}
//--------------------------------------------
//--------------------------------------------
//--------------------------------------------
global proc loadshelf (){
string $file = `fileDialog -m 0 `;
eval("source \"" + $file + "\";");
string $basename = basename( $file, ".mel" );
eval $basename;
}
showWindow NsShelftwindow;
i made this custom shelf with saving out the buttons
and all that works fine...
but when i load it in and eval the script the the buttons
comes in the buttom of the layout... you can see it
if you try to run the script..
plz help
Best Regards
Nicolai Slothuus
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
if(`window -exists NsShelftwindow`)
deleteUI NsShelftwindow;
if( `windowPref -exists NsShelftwindow` )
windowPref -r NsShelftwindow;
window -w 300 -h 300 -t "NsShelftwindow"
-titleBar 1 -mnb 1 -mxb 1 -mb 1
-tlb 0 -sizeable 1 NsShelftwindow;
frameLayout -w 200 -l "Selction"
-la "top" -bs "in"
-cll 1 -cl 1 frameAnimSelcSet;
columnLayout -adj 1;
columnLayout -adj 1;
gridLayout
-cr 0 -aec 1 -ag 0
;
button -l "Save" -align "center"
-c "saveShelfButtom + ";
button -l "Selc" -align "center"
-c "selectToShelf";
button -l "Load" -align "center"
-c ("loadshelf");
setParent..;
setParent..;
NS_ShelfSelc;
setParent..;
setParent..;
setParent..;
columnLayout -adj 1;
button -l "Save" -align "center"
-c "saveShelfButtom + $run ";
//--------------------------------------------
//--------------------------------------------
//--------------------------------------------
global proc NS_ShelfSelc (){
columnLayout -adj 1;
shelfTabLayout -h 200
-image "smallTrash.xpm"
-imageVisible true mainShelfTab;
shelfLayout anim;
}
//--------------------------------------------
//--------------------------------------------
//--------------------------------------------
global proc saveShelfButtom(){
string $tempDir = `fileDialog -m 1`;
saveShelf anim ($tempDir + "");
}
//--------------------------------------------
//--------------------------------------------
//--------------------------------------------
global proc loadshelf (){
string $file = `fileDialog -m 0 `;
eval("source \"" + $file + "\";");
string $basename = basename( $file, ".mel" );
eval $basename;
}
showWindow NsShelftwindow;
