Well I for one got busy and haven’t had a chance to pick up the work. Where it left off was figuring out a good way to let a user choose standard toolbar buttons or macros and populate a radial menu with those.
I still haven’t gotten a chance to test @antoine code he shared but still intend to, hopefully soon
Hi @morris
This project is not close but @michaelvollrath , myself and many other people on this forum are not full time dev, and not professional dev, so debugging and finding solution are time-consuming, between a POF that seems to works and something useful by anybody is a long path
The goal was something easy to manage for everyone from a Rui file, and some bugs for extracting icons from rui had been solved in the latest SR…project will be follow but be patient
Thank you for your work. There is no hurry, I just wanted to check, if this project is still alive. I’m looking forward to some progress. Please let me know if I could be of any help (like a tester or something?).
Thanks for the XML parser. I started looking into it and comparing against opening an RUI file in notepad++ and found some interesting things that may benefit us.
I don’t know if all RUI files are like this… but I tested by exporting the Enscape toolbar to parse against and here are the interesting bits I found lie within macros and icons:
Icons (icons):
The actual SVG code lives here (between the red lines):
We can parse with svg begin through svg end to get the actual .svg code for the icon to generate the image from either as .svg or by converting to bitmap for Eto. Unless someone know if Eto supports .svg images, that would be better yet.
example of the parsed svg code in an online viewer showing the icon under output: Uploading: image.png…
Here ^ you can see between the macros lines we have the actual script block showing the command being ran in this case !EnscapeAboutCommand.
To confirm, we can copy paste this command to the command line in Rhino and the appropriate dialog appears as it would if the toolbar button was pressed.
I don’t understand how to export a single custom toolbar or a single toolbar like “Drafting” for example?
Perhaps someone can shed some light on that.
I need to see if the svg and script code is consistently parsable across other RUI xmls as well.
If so, we are in business and the next step is just plugging those values into the Radial Menu GUI code where we can replace the bitmaps with the parsed svg content either as .svg or converted to Eto.Drawing.Bitmap and the rs.Command strings with the parsed script values.
I’m excited, I think we are close to an easily customizable Radial GUI unless I’m overlooking something obvious?
I thought I’ll look at it, I don’t know what is the target aim V7 and V8 or V8+?
The thing is that I see inconsistency in handling rui files, V7 rui files are named rui and are in %appdata%\McNeel\Rhinoceros\7.0\UI but in case of V8 there’s no UI folder at all though now it seems that all rui’s are packed into C:\Users\UserName\AppData\Roaming\McNeel\Rhinoceros\8.0\settings\Scheme__Default (?), however I still can’t find where are original rui’s/xml’s for default Rhino Scheme (anybody can share location?)
Plus seems you’ll have to struggle with both svg’s and bitmaps at least according to what I see in here:
Worth noting that in V7 RUI had bitmap with 3 sizes BUT all RUI icons were merged to single base64 string
If rui support is planned then it will be a lot of work to handle the correct parsing of those elements.
You have to parse XML and you start with parent of <tool_bars>, which in my “inspection file” seems missing and I don’t see names here, guid’s are to work with but I have no idea where those are pointing. Maybe I’d figure it out if I’d knew where to find the original/default rui/xml
I don’t think Rhino tools are as “nicely” packaged as this ObjectProxy but I also have no idea, so now it’s time to dig back into that and see where the actual toolbar images are being set/stored with each tool.
It will be so helpful ans simple if all Rhino Icons, even the regular ones are saved and well packaged in the same place, with name macros shortcut …and icons… toolbars only need to pick them in a unique folder…
Maybe McNeel team could help?..
@dale I would like to know if you had some time to look into the best way to use svg icons as icons directly in Eto… since all Rhino icons are svg based…and Rhino Gui … Eto based…
I use custom popup menus all the tile in Rhino, accessed mostly via an alias or shortcut binding to my Stream Deck. I really like the idea of a radial menu like this. I tried the Cad Mouse implementation for 3D Connexion, but it never really “clicked” for me.
Looking forward to following progress on your project, and would be happy to test if you are looking for testers.
Personally, I think an interesting radial menu idea would be some way to bring up options and inputs for an active command from a radial menu instead of always navigating to the command prompt.
Really good work ! Anyway to convert python into c# ?
I’m wondering if it should be easier to drag and drop buttons from toolbar into the radial menu.
So I’ll first trt to convert your code into c# (because I want to learn c# ) and then think of a drag/drop solution.
this would be wonderful and of course we welcome this kind of implementation. getting the icon of any tool from a toolbar in Rhino is the current blocker to more progress. happy to see any solutions towards this!