|
I am currently building a custom UI window to aid in the production of a short film, I thought it was a good place to begin learning how to program MEL. However when I try to implement the shelfLayout object, I can’t seem to work out how to save the items that i drag into the shelf , when i close the window.
Can anyone shed any light on this please
Thanks
|
|
|
|
try the “saveShelf” command;
// Create a window with a shelf in it.
//
string $window = `window`; string $tabs = `tabLayout`; string $shelf = `shelfLayout`; shelfButton -image1 "commandButton.xpm" -command ("print \"Hello\\n\""); tabLayout -edit -tabLabel $shelf "Example Shelf" $tabs; showWindow $window;
// At this point the example would be made more interesting if you
// put some additional items on this shelf.
// Now save the shelf in the temp directory.
// string $tempDir = `internalVar -userTmpDir`; saveShelf $shelf ($tempDir + "ExampleShelf");
in that example it saves the shelf immediately after creating the window if you run the entire thing, but you can take the saveShelf command and make it work with a button, etc.
hope that helps! :)
|
|
|
|
Thankyou that worked a treat :)
|
|
|