Is there a “Best Practices” for Custom Button and Toolbar Creation?
Is it best to use bitmap images or SVG images? When linking or adding scripts is RVB or python best to use?
Is there a “Best Practices” for Custom Button and Toolbar Creation?
Is it best to use bitmap images or SVG images? When linking or adding scripts is RVB or python best to use?
Different people will have various opinions…
To answer the second question first, Python will be much better. Cross-platform and much more powerful, and (IMO) not any harder to learn. VBScript (.rvb) should be considered as ‘deprecated’…
As far as toolbar buttons go, SVG is the current and future method for button images. Bitmaps, while still supported, are a thing of the past.
As far as how one creates a custom button, my current advice is to use the Macro library (type Macros) to create the command or add the script and give it a name first. Then via the button editor, create a new button and add the command macros at the prompts, then add your image and you’re good to go. Things may change for V9.
Great, thank you for your help. Much appreciated.
Is there a best location for the new SVG files to be stored?
IIs there any part of this process known to stall or massively slow down Rhino, on file open?
Once the .svg’s are saved in the button, they are stored internally in the Rhino settings file - the original .svg files are therefore no longer needed to be loaded by the button and can be moved. So, basically, store them wherever you like.
I don’t think loading custom toolbar files takes much more time than the default - in any case I have a custom setup that has maybe 100 custom buttons and I haven’t noticed any significant slowdown. Many other things like plug-ins can slow down Rhino opening, but I think toolbar files are the least of your worries.
Thank you, that makes sense regarding svg over bmp. Smaller overhead in the settings file using svg, not to mention crisper image and better scaling?
Well, in the end the .svg’s are converted back into bitmaps to be shown on the screen in pixels. Yes, in principle the scaling should work better, but there have been discussions in the past concerning certain odd scaling factor cases that work less well.