View Full Version : Shelf problem
04-08-2006, 11:32 PM
I've changed Maya UI and docked additional shelf under toolbox. Is it possible to display shelfLayout without scrollbar ? When I try to save my new shelf using saveAllShelves command Maya doesn't save it (It looks like it save it, but nothing changes in prefs folder). Why ?
Thanks in advance
P.S. Sorry for my English :)
04-09-2006, 12:53 AM
I dont fully understand your problem. But if you want to save the shelf, go to File|Save Preferences and it should save all that stuff. Check if the files under prefs dont have the read only option checked, othwerwise changes wont be saved...Anything else you need, just say...Cheers..
04-09-2006, 09:07 AM
It's strange to me, but Maya doesn't save contents of my new shelf. When I try to save it by typing saveAllShelves $gmyShelf it returns 1 , but it doesn't save the shelf. I want to get rid of this scrollbar also. Is it possible ?
04-09-2006, 12:38 PM
did you try the thing I told you about go to File|Save Preferences, and before doing this, check if the files are NOT read only on you prefs folder?!?!?
about that scroll, I dont know how you managed to put that there. I dont have that...
04-09-2006, 01:05 PM
Yes , I've checked prefs folder and all filies in it, and changed attributes of it. I made this new shelf by changing toolbox.mel file. I changed shelf.mel file also, because I want to save my new shelf using Save All Shelves command. I don't know why Maya doesn't save it. It doesn't show any errors or something like that.
04-09-2006, 01:16 PM
hummm...I see. I think I cant help yuo, because you have changed the files in the prefs thar handles shelf stuff. So I dunno what to say...Sorry...
04-25-2006, 09:23 AM
Can you get into the shelf editor when using your new shelf?
I'm getting a very similar problem, I've made a window with several shelf tabs on it, which works fine. But whenever it is loaded I can no longer get into shelfEditor, and none of my shelves will save any more.
I think there must be a problem somewhere when creating new shelfLayouts but I can't find anything obvious.
04-25-2006, 04:14 PM
Yes , my shelf editor works fine. My problem is different, because in my case Maya doesn't save contents of my shelf. My shelf editor works ,but for my problem it's useless.
use the saveShelf to save a specific shelfLayout to a file.
check the docs for that :)
04-26-2006, 08:29 AM
I asked Alias support about this issue, and they get the same problem and don't know why, but hopefully they will be able to sort it out. To get it to save shelves again you just have to kill your new shelf window, so you could hack shelf.mel so that the menu command will delete your window. I don't know how to get it to do this automatically at maya shutdown however.
I also noticed that this only happens when using a shelfLayout, I changed my script to just use a gridLayout and I don't get the problem anymore. You lose some functionality of a normal shelf though, its now basically just a list of normal buttons.
I'll reply again if I get a decent result from Alias.
04-26-2006, 02:27 PM
When you call saveAllShelves you need to pass it the parent control...probably a shelfTabLayout. When you do this does it put new files in your shelves directory?
If you do get the new files then your shelves will probably end up in the main Shelf on your next startup. The loading of shelves from that directory are pretty much hard coded in MEL scripts to load into the main Shelf.
I posted a description in my blog about adding your own UI component into Maya...I could add one about adding your own extra shelf if it would help. It would require hacking around with Maya's MEL scripts though...
04-27-2006, 06:52 PM
I tried with saveShelf command (how can I missed it :) ?) and it save my shelf , but how can I load my shelf into my custom shelf ? LoadNewShelf command place it as new shelf tab in main shelf. How can I place it in my custom shelf ? Any example would be great :)
there might be commands defined for this but, as i see, saved shelf files contain an procedure (called shelf_myShelfName) that builds the shelf buttons. So, after you create the shelfLayout add the shelf_myShelfName; then setParent..; commands to build the buttons :)
04-28-2006, 06:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.