I check it tomorrow, but there is a solution already since V9 okt 1. You can import all sort of sizes of png, and it comes in well. Couple of notes:
-If you have updated some icons here, be sure to close V9 and reopen before you save your RUI. Seems to me it saves the RUI as it was when V9 started only.
-Change both light and dark icon, so you dont have png in white one and svg in dark mode. No big deal, but it boot in dark mode, so you have to change back to white, if that is your preferred.
-You use same RUI on R8, export or copy and rename it. But you kind of out of luck if you try to open it in V7.
Confirming high res .jpg’s open as fit-to-window. However .svg’s do still open zoomed in, and I don’t see any way to resize them.
More troubling, SRC13 no longer runs the scripts that the buttons point to. The button passes the correct command to the command line, so I think that’s a matter for another thread.
I use V9 as testbed so not installed R13RC, but I assume that V9 mirror V8RC changes and then V9 okt 10 is nearly the same as V9 okt 1; png all sizes ok. SVG preview is ok on okt 10 (not on okt 1), but end up with same scaling issue. (way to big)
As it’s saved as an SVG, the svg will serialize the image to base64 and store it inside itself, so the RUI won’t change anything there. Looking at my code, the image is imported and saved at the same resolution it was imported at. I could downsample the image when serializing to 48x48 instead of keeping it at 256x256.
I assume the preferred solution would be to store the PNG as 48px when you import a “high-resolution” 256px PNG, since it takes up much less space. The SVG converted from the 256px version looks pretty good with a small file size, so that should be sufficient. However, SVG conversion from a 48px PNG doesn’t look as good, so that option is not optimal.
In the test RUI file with 31 icons, there are 62 bright and dark versions. Additionally, 5 icons in a drop-down menu account for 10 more icons, bringing the total to 72 icons. File sizes for 72 icons in a new RUI file:
48px PNGs: 458 KB
256px PNGs: 4725 KB
Running the TestDupSvgs results in around 1400 icons, which I assume come from the default RUI alone. This would make the RUI file about 91 MB. (72/4.7 * 1400)
Q:
Is there a list somewhere with all the current commands in Rhino?
Wish:
One minor issue: When importing an image that isn’t perfectly square, it aligns to the top-left corner by default. I think it would be better if it centered by default (center-center), to avoid having to manually rearrange the icons.
It’s time-consuming to make changes one by one at the final stage. Would it be possible to use an Excel file as a database for generating toolbars/RUI and aliases, and then create a script or executable to automate this? This would allow for a single overview of the commands, generate an RUI file, and import an Aliases .txt file.
Good call. Not hard to implement either. I’ll get that one rigged up
Quick RUI Editing.
I see what you’re asking for, and why excel would be a great solution. Yes I can imagine organising, managing and editing a large RUI would be difficult. I believe this can likely be scripted up. Ultimately my take away fromthis, is that managing and working with RUIs is cumbersome.
The assumption from my side is that I look an SVG representation from the underlying/original PNG. The perceived image quality from the 256px PNG appears sharper and crisper compared to the 48px version. Additionally, I assume the file size difference between an SVG generated from a 256px PNG and one from a 48px PNG is minor. So, generating an SVG from a 256px PNG and scaling it down to 48px seems as you point out, to offer the best of two worlds; great visuals and small size.
Here’s a comparison of the two states: (Pic: 48px vs 256px)
Regarding “TestDupSvgs”—fingers bit to fast on my keyboard! My bad. Make that TestDumpSvgs" (the command that strips out all the SVGs into a folder on the desktop).
Yes, something that by default connects the dots and provides a clear overview in one place would be beneficial for everyone.
The SVG Editor in R9 (Nov 14) felt more sluggish compared to the Nov 06 version and didn’t seem to function very well.
I don’t understand the logic of trying to integrate a “basic” SVG editor into the same format as a novice-level, small, and simple bitmap editor. Is that even feasible, and how long would such an endeavor take?
Personally, I’ve never used the previously included editor. In external editors like Photoshop, you can tweak thousands of icons simultaneously if needed. Why invest effort into an editor with minimal tools that doesn’t provide sufficient functionality?
I think the primary role of the “SVG Editor” should be to act as a stable tool for importing/exporting and converting the original picture/icon to SVG and 48px, 32px, 24px, and 16px format.
Afterward, a lightweight, standalone SVG editor could be developed, something users might open separately if/when it becomes more robust and feature-complete.
Additionally, it would be great if the original image could also be converted to 32x32px to ensure compatibility with the RUI/toolbar in Rhino 7.
This bug has been resolved and will be in the next 8.14 release, apologies for this, it was a very obscure bug.
The goal is an editor that lets you import and compose icons, from svg to bitmap with added functionality to allow adding items on top. It might not have every single required functionality yet, but I’m slowly adding them, mostly focusing on this goal below. Ideally you’d be able to open up any icon inside Rhino and edit it.
Currently it exports to 64x64 as default so I could offer the ability to choose or input a size. Possibly even multiple sizes at once.
I’m also working on some bug fixes that should resolve some of the SVG import issues, especially in regards to scaling.