Context menu Submenu
-
Hi, i'm trying to organise my right click menu (mine started to go under the table) - i'm now dealing with multiple submenus
- anyone with a quick snippet on multiple submenus code?
this is what i'm trying to achieve
oh, and another question please - is there a way to 'specify' the position of the menu? (eg not at bottom)
-
Hi !
Like your example :UI.add_context_menu_handler do |menu| rbm = menu.add_submenu("Ruby Tools ;;") sbm = rbm.add_submenu("Rotation") sbm.add_item("Around red") { function } sbm.add_item("Around green") {function } sbm.add_item("Around blue") {function } menu.add_item("Erase coplanar Edges") { function } end
sbm is a submenu of rbm, a submenu of menu...
-
Thanks Matt - will give it a try!
-
one remaining bug - the menu always shows up at the bottom. i tried changing the loading order of the scripts but it doesn't work. it is not even sorted alphabetically..
-
hey guys once youve figured out how this could work ... would it be available as a ruby so that us mer-mortals can chose where we place our ruby scripts ?
-
unfortunately per user options are the most difficult ones because there is no standard we can all rely on.
you can look at the menu items, usually at the bottom of most scripts and try to figure out what they do. then tweak them to suit - but it is a slow process and does not always work. some scripts are scrambled and the menu part of the code is not accessible.
i am working on a new rubyset which will display the scripts in a cleaner fashion both in the plugins menu and in the context one.. hope to finish it sometime in september
-
Organizer will allow Plugins menu organization by system folders - make a subfolder in your Plugins folder, then drop the desired .rb files into that subfolder. Organizer will create submenu items having the same name as the folder, and the submenus will contain the ruby scripts you placed there (I skipped a step or two in that description, but that's the basics).
-
my plugins menu was getting unweildy, so one weekend, i went through my downloaded scripts, did a little tweaking - and came up with this - if its unwieldy, well i don't know how to program .
i copied and pasted scripts with similar functions, relocated their UI functions and tweaked them
question - does organizer work with encrypted scripts?
-
i don't use organiser so not sure of the answer - thanks for sharing, it will be interesting to see your solution
-
true - that was why i named the scripts building tool 1, 2, 3 etc . .so scripts related to what i refered to as 'building operations' woul reside close to each other.
-
Just one thing I read somewhere on this forum : you can organize manually your plugins menu by renaming all scripts.
Example :
001_SCF toolbars.rb
002_JointPushPull.rb
003_Greyscale.rb
etc etc etc... Bla bla blaBut naturally you have to change name inside the code (in file_loaded), and impossible to change an ecrypted script !
-
Advertisement