Hi All,
So finally I got around to learning some Ruby - helped no end of course by all the forum guru's great lessons here - and here is my first ever plugin. Trog's Style Chooser.
The plugin allows you to choose your four favourite styles, memorise them, and call them up from a dedicated sub-menu of the 'view' menu.
The idea is to be able to assign a shortcut key to the 'Recall' menu items, and then you can instantly change styles with a quick stab of a key. Of course, with the right settings, you can do something similar with scenes - but I prefer to use those just for storing viewpoints, and you can only assign shortcuts to cycle around them, which I find very annoying when I just want to quickly get to one of the first few from a long list.
A few instructions...
To assign a view, set up the model appearance as you like, and then, if it isn't already, store this as a named style. Then selected "View -> Style Favourites -> Store (X)".
To recall, "View -> Style Favourites -> Recall (X)".
The favourites are stored in a small file inside a sub-folder of the "plugins" folder, so that they are there for next time.
All of those options will be available for assigning shortcut keys.
Note that the Styles are referenced by name, so you need to be aware...
- To recall a style it must be resident in the current model (I added my favourites to my default template to make sure they're always there)
- The styles must have unique names.
- Recall menu items will be greyed out if no favourite has been set, or if the style is not present in the current model.
- A folder called "Trog_Style_Chooser" will be created inside the plugins folder to store your favourites.
MOST IMPORTANT. This is my first ever plugin!! Despite the wonderful examples provided here on the forum, I cannot guarantee that the plugin is perfect - there are no restrictions on how you may use it, but I also make no promises how good or useful it might be!!
DOWNLOAD..
If any of the forum Ruby experts care to comment about the quality, or otherwise, of my code, I would be extremely grateful. I have tried to avoid all of the pitfalls that I have seen warnings about on the developer's forum - but I am very new to Ruby, and much of what I read goes straight over my head at the moment!
