Due to all of the UI changes re: icons etc. in 2016, I elected to not migrate my 2015 configuration when installing 2016. Now I'm recreating my custom shelves.
I notice that pre-built shelves like "Polygons" have separators, which displays as a vertical bar between buttons. However, after inspecting those in that shelf, and searching the documentation, I can't work out how to add separators to my own shelves.
Can somebody point me to the documentation page which talks about how to add separators?
Solved! Go to Solution.
Due to all of the UI changes re: icons etc. in 2016, I elected to not migrate my 2015 configuration when installing 2016. Now I'm recreating my custom shelves.
I notice that pre-built shelves like "Polygons" have separators, which displays as a vertical bar between buttons. However, after inspecting those in that shelf, and searching the documentation, I can't work out how to add separators to my own shelves.
Can somebody point me to the documentation page which talks about how to add separators?
Solved! Go to Solution.
Solved by pshwayka. Go to Solution.
I don't see any documentation on adding shelf separators, but after examining the mel script for one of the existing shelves, I discovered that the command addShelfSeparator(); does the trick. I was able to create a new shelf, add some items to it, then go in and edit the script to add the separator between shelf button definitions.
The shelf scripts are in documents\maya\2016\prefs\shelves.
(On a mac it would be <username>\Library\Preferences\Autodesk\maya\2016\prefs\shelves.)
I know...it should be easier than this.
I don't see any documentation on adding shelf separators, but after examining the mel script for one of the existing shelves, I discovered that the command addShelfSeparator(); does the trick. I was able to create a new shelf, add some items to it, then go in and edit the script to add the separator between shelf button definitions.
The shelf scripts are in documents\maya\2016\prefs\shelves.
(On a mac it would be <username>\Library\Preferences\Autodesk\maya\2016\prefs\shelves.)
I know...it should be easier than this.
What I tried, after looking at shelf_Polygons.mel, was to copy:
separator
-enable 1
-width 12
-height 35
-manage 1
-visible 1
-preventOverride 0
-enableBackground 0
-style "shelf"
-horizontal 0
;
and insert that into one of my custom shelves (using an external editor). Seemed like it got stripped the first time I tried it, but in the end it worked.
But as you suggested, I also tried just adding:
addShelfSeparator;
and after Maya read in the .mel, the expanded/interpreted result was the same as the 'separator' code snippet I had copied from shelf_Polygons.
Thanks for the input. Now Maya team, add a button "Add Separator" to the Shelf Editor for those not comfortable manually working with mel. Seems like a natural addition...
What I tried, after looking at shelf_Polygons.mel, was to copy:
separator
-enable 1
-width 12
-height 35
-manage 1
-visible 1
-preventOverride 0
-enableBackground 0
-style "shelf"
-horizontal 0
;
and insert that into one of my custom shelves (using an external editor). Seemed like it got stripped the first time I tried it, but in the end it worked.
But as you suggested, I also tried just adding:
addShelfSeparator;
and after Maya read in the .mel, the expanded/interpreted result was the same as the 'separator' code snippet I had copied from shelf_Polygons.
Thanks for the input. Now Maya team, add a button "Add Separator" to the Shelf Editor for those not comfortable manually working with mel. Seems like a natural addition...
It's a one-click operation if you install Bonus Tools for 2016. From the Bonus Tools Menu, go to Create -> User Interface -> Seperator. Why it's not built into the Shelf editor window, I have no idea...
It's a one-click operation if you install Bonus Tools for 2016. From the Bonus Tools Menu, go to Create -> User Interface -> Seperator. Why it's not built into the Shelf editor window, I have no idea...
Kudo
Just a general note to confirm a question you Internet-going wayfarers out there might have:
I'm a Maya LT user and I was able to perform all the steps listed in this topic, including doing the manual approach by editing the mel script of the Shelf, as well as installing the Bonus Tools (yep, they exist for Maya LT, too!!).
So kudos for being a helpful topic, everyone. 🙂
Just a general note to confirm a question you Internet-going wayfarers out there might have:
I'm a Maya LT user and I was able to perform all the steps listed in this topic, including doing the manual approach by editing the mel script of the Shelf, as well as installing the Bonus Tools (yep, they exist for Maya LT, too!!).
So kudos for being a helpful topic, everyone. 🙂
For the same reason they dont do a lot of things they should.. lazyness, i guess. Or because they dont need to. If they are getting massive profits, why they should be worried about anything? at least that is what it looks like, unfortunately.
For the same reason they dont do a lot of things they should.. lazyness, i guess. Or because they dont need to. If they are getting massive profits, why they should be worried about anything? at least that is what it looks like, unfortunately.
Or at the very least, when someone tries to load a shelf that already exists, just pop up a warning that you're about to overwrite a shelf.. or add a "referesh shelves" button.
Or at the very least, when someone tries to load a shelf that already exists, just pop up a warning that you're about to overwrite a shelf.. or add a "referesh shelves" button.
Can't find what you're looking for? Ask the community or share your knowledge.