The action menu
The 'action menu' is the menu that shows in editor views when you hit the spacebar. The same menu is
also shown under Scene -> Actions in the application main menu.
Each entry in this menu calls a script. The scripts are each defined in separate files under the
config/actionMenu folder. The layout for the menu structure is defined in a .json file.
Customizing the action menu
To construct the action menu, R.U.B.E looks for the file 'layout.json' in all subfolders of the
config/actionMenu folder. If layout.json exists, its contents will be added to
the action menu. This means that scripts and the custom menu structure for them can easily be
shared with other users by dropping a new subfolder into the config/actionMenu folder.
The default action menu can be found in the folder config/actionMenu/default:
Here we can see the script files for the first few entries of the Add -> Add body menu. The contents
of these files is the same script you would use in the script panel,
so if you create a script that you would like to keep and reuse, it can be added to the action menu
with no further changes.
Please see the Customizing the action menu (manually) topic
for instructions on how to edit 'layout.json' to arrange the menu structure to your liking.
A built-in dialog to make this task easier is planned for future versions of R.U.B.E.
Reloading
Every time the action menu is used, R.U.B.E will check the file modification time on the layout.json files
to see if they have changed, and will check for any added or removed subfolders under the config/actionMenu
folder. If a layout file or any subfolders have changed the menu will be reconstructed, so you don't need
to do anything else to reload the menus.