[Plugin] Rendering Favourites (v1.1)
-
Following on from my previous Styles Favourites plugin, here's a new one that comes a little closer to what I originally intended to do.
It creates a toolbox and 'View' sub-menu (which can have shortcut keys assigned) that allow all the parameters of a model appearance to be quickly stored and recalled.
Unlike Styles and Scenes, this also includes things like the 'Hide rest of model' and 'Hide similar components' settings, fog settings, as well as all of the regular colours, shadows, x-ray, textures, default face colours etc.V1.1 - 09 Dec 2012
Added features...- Ability to automatically export a folder of images, one for each 'favourite'
- New options dialogue for export settings and fog/shadown recall settings
- Save/load complete 'favourites' sets and settings.
V1.1a - about 10mins after 1.1! - Bugfix - loading previous settings stalled the plugin at startup (silly typo!)
DOWNLOAD: Trog Render Favourites 1_1a.rbz
Installation:
Download the .rbz file and then use the 'Plugins->Install->RBZ Package' menu item to navigate to the download file and let SU take care of everything.
--OR--
If you use an older version of SU without this feature...
Rename the download file by changing the extension from .rbz to .zip. You can now unzip the archive. Copy the 'Trog_Renders.rb' and 'Trog_Renders' folder directly into your Sketchup plugins folder.Basic Usage:
- Set up your model with all of the style, shadow, hide options etc. that you would like to store.
- Click one of the 'Store Favourite' button on the toolbar (red), or choose a 'Render Favourites...->Store Favourite' item from the View menu.
- A pop-up will ask you for a name for the stored settings - this will appear as a reminder of the settings in the status bar or tooltips. You can also click the cancel button to abort the store operation.
- Set up favourite settings for as many of the 8 'slots' as you like.
- Now just click the 'Recall' buttons (green) or menu items to get the model looking just as you set it up previously.
Export images. The export item will create a sub-folder within the current model's directory called "<model name> Renders", and will then recall each 'favourite' in turn and export a bitmap image (empty 'slots' are skipped over). Image files are named after the model, suffixed with the favourite's index and name.
Set options. Select this to open an options input dialogue. This is where you set up the file-type, resolution etc. for exported files. You can also choose to export only a sub-set of the current favourites. There are also special options for the shadows and fog settings that allow only the on/off status to be recalled so that carefully set-up sun positions etc. are not disturbed.
Save/Load settings. With these you can keep HDD 'presets. The files will store a complete set of all current favourites, export settings and other options. Default file extension is ".rend".
Show current renders
Opens a pop-up box showing a list of currently stored 'favourites', and a complete list of all the currently visible rendering options.About...
Shows a few details about the plugin and a 'Quick Start' user guide.All of these operations can be assigned to shortcut keys for quick zipping between different view options. Unlike the earlier plugin it does not rely on you having specific Styles present in the current model.
Disclaimer
I've done my best, with the wonderful assistance of the forum Ruby gurus, to make this a reliable, bug-free plugin. But I'm still very new to making plugins.
You may use it free of charge any way you like, so long as the copyright notices remain intact, but I offer no warranty - it is provided 'as is' and with no guarantees!
Note also that this is untested on a Mac! I avoided using any PC specific API commands, so it should be OK, but I cannot say for sure.Why?
When I made the previous 'Styles Chooser' plugin, several folks asked why, when we have Styles and Scenes, anyone would want such a plugin.
I think this has to do with my way of working - I don't do smart photo-realistic renders, or animations - I just need to make engineering designs as quickly as possible.
Styles and scenes are still useful to me, but...- They cannot be assigned to shortcut keys - using the buttons and tabs just means less screenspace and more mousing!
- They do not change some of the settings in the way I like. For example when I go into X-Ray mode, I nearly always also want to hide 'rest of model' and 'other instances' so I don't get distracted by items in the background.
- Scenes, I prefer to think of only as 'Viewpoints' - very handy for storing a useful viewing angle, but I get easily confused when i start mixing up scenes that alter different sub-sets of parameters.
- Having an API to make the software work just the way I like is great, and I really wanted to get some practice with the API, but keep that separate from the scary geometry and maths needed for the tools that I'd like to make one day.
Many thanks to all the Ruby gurus who post here - this wouldn't have been possible without them. Particular thanks to TIG, who took the time to go through my previous code and put me straight on a few 'best practices'.
-
Just what I (and I guess not only me) need!
Have you answered my request and problems with scenes, or is it coincidence? http://sketchucation.com/forums/viewtopic.php?f=323&t=49323In both cases - THANK YOU. This will be very useful for compositing visuals from SketchUp, and it works great!
There is only one step for fully automatic export, and that is a button for exporting images of favorites with corresponding names...
and importing and exporting predefined favorites! I'll make the first oneIt's even better - it works across different files! But, for this purpose, I think it would be better not to remember shadow and fog attributes, because they differs from model to model, except on or off state.
Here is the example. Favorites are numbered so they stack for compositing in Photoshop or Gimp ... so with "open as layers" they are stacked in logical order.
-
Thanks, srx, glad you like it.
I read back your request post from earlier - I had missed that one, so it is an interesting coincidence that this works for your application, which is a very different style of work to mine.Thanks for the suggestions too, I think they could be very useful to enhance the plugin.
I have been reading some more of the Ruby API, as already I was wishing to add some options for the user to select which properties should be recalled. If I can do this, I'll certainly take up your idea of an 'on/off only' option for the subsections - your shadows/fog example shows well how this would be useful.
Cycling through the stored 'favourites' would also be relatively simple to do - the Ruby script methods are designed to handle any arbitrary number of stored 'favourites' by simply editing the MAX_RENDERS constant - at the moment the maximum is 8, simply to ensure that the toolbox icon files can be found. An 'auto export' dialogue should be simple , as it would only need to know the start and end indexes and a folder path. -
Thanks for the plugin! A couple thoughts on the subject. It occurred to me that a template with all the scenes saved without the camera being set would work. Import your model and save a new scene for each camera. Then cycle and export each scene after the camera position is set. Making the separate SU file helps from cluttering the working model with scenes.
How would resolution and file type be handled in export? Also sometimes edges need to be exported at higher resolution than the rest.
-
@pbacot said:
Thanks for the plugin! A couple thoughts on the subject...
Thanks.
Your thoughts are interesting - my main reason for this plugin was just to speed up my modelling workflow using shortcut keys, so the whole subject of rendering layers for post-production is a complete mystery to me. I'll certainly consider any ideas that could make the plugin more useful to a wider range of users.Version 1.1 is now available in the top post, which includes the ideas suggested by srx...
- Automatic exporting of a folder of images, one for each render 'favourite'. They are placed in a sub-folder of the current model's directory named "<model name> Renders". Each file is also named after the model, suffixed with the 'favourites' index and name.
- A new options panel to set up the export settings, and also to set the shadow/fog sections to either load the complete parameter set, only the on/off status, or none at all. All settings are remembered between sessions.
- Ability to save and load the entire set of 'favourites' together with the options - default file extension '.rend'. Currently defaults to the plugin's own 'home' folder, but maybe the current model folder would be better?
-
Ooops - apologies to the two people who loaded v1.1 - a typo in the code was stopping the previous settings from loading properly.
v1.1a uploaded with the variable names spelled right!NB) Adding the options dialogue has changed the file format slightly. If you have problems loading the plugin (Read past end of file error), it could be because of a file left over from installing version 1.0.
Inside your plugins folder, look for the "Trog_Renders" folder, go inside, and delete the file "Trog_Renders.dump" - this will reset everything to the factory default settings and enable the plugin to initialise properly. I'll try and add a routine to catch this error ASAP. -
Great! Thanks again.
-
THINKYOU VERYMUCH!
-
Troggluditte
Does your plugin work with 2013 yet, I was using it with Pro 8 but it seems to not work with 2013 (but it could just be me!). It is incredibly useful by the way so thankyou very much and I hope I can get it to work in 2013
-
Hi Dan,
Thanks for the heads up.
To be honest I haven't even tried 2013 yet - I'm on a short deadline for a crucial project, and don't want to risk upsetting my system until that's out of the way (Got to arm-twist the bean-counters into paying the upgrade too!)
However, I'll see if I can find some time to play with the 'Make' version at home over the weekend, and give all my plugins a once over for compatibility. From the posts over the last few days, I would guess the problem is most likely to do with the new toolbar system, so fingers crossed, there won't be too much code to change! -
Steve,
This is cool! I apparently missed it before.
One thing I'd like to ask for if it is possible. You can tell me to take a hike if you want.
When I make multiple exports of a view in Sketchup, I often make hidden line exports larger than the textured and shadow images. Sometimes I make several different "lines" images at different sizes. I resize the larger ones to match the smaller images so that I can get thinner lines. Sometimes these exports combine different line styles, too. I've been working on some sets of styles that are intended to be used together. Your plugin would make the exports really easy and the user wouldn't need to create scenes for each style as I do now.
So, my question is: Would it be possible to specify different export sizes for different stored "favourites"?
Thanks.
-
Hi Dave,
Glad to hear you find the plugin useful.
I don't think that your request should be too tricky to implement - though I'll need to try and find a way not to break any old 'favourites' that anyone might have stored.I don't to any rendering myself, so I wonder what you think the best way to implement this would be. I was thinking that maybe keeping the 'global' size option, and then allowing each favourite a 'scale factor' might be a nice approach, to save folks having to mess about with a calculator to ensure the same aspect ratio - but would that impose any limitations on your ability to combine the images the way you would like?
Naturally, I want to try and sort out any SU2013 issues before adding any new features, so it might take a little while before I can implement new scaling options. But don't be afraid to give me a kick if I appear to have forgotten - my project management goes to pieces the minute I'm not at work with the boss peeking over my shoulder!
(Note to self - must finish 'Quick Lathe' plugin!). -
Steve, I'll make some examples to show you what I'm after. Your idea of scaling the output dimensions for specific "faourites" could be workable.
Advertisement