If some of you guys are curious enough, you may have noticed that in the last release of my plug-ins I defined some strange keywords within the command items category. Well, it was not just for fun! I've been looking for a convenient way to regroup all my custom commands within a single organized menu.
Currently each of the commands I developed is accessible via a built-in menu if I could find a decent category to fit it in, which was actually not the case for the CC_runOnce. But by using the CC_menu plug-in and thanks to those strange keywords that actually defines a submenu hierarchy, it's now possible to dynamically regroup the desired command items within a structured menu that will appear in the top menu bar.
To be added in this menu, a command must match two conditions:
- - being owned by a plug-in registered with my name as author.
- - having the first category element defining a valid menu subhierarchy. A menu subhierarchy is valid if the first item match the top menu name ("CC_tools" here) and if the submenus are separated by a '|' character.
Of course this menu is specific since it will only add the commands that match my details but you can easily change that behavior by recompiling the plug-in after having modified the variable "FILTER_AUTHOR" that is defined in the "menu_tools.cpp" file. You may also want to rename the menu label by replacing all the "CC_tools" you see in the project files by whatever you want (be careful with the spaces and special characters though).