A month or two ago (I’m not sure which version of R8), I was able to include a toolbar’s .rui file as a project resource and build the project into a plugin without any problems. The .rui file would load up when the project was loaded, and it worked just fine. Today, I tried rebuilding the plugin with the exact same .rui file (I’d updated some of the commands), and upon loading the plugin, the .rui that gets loaded is completely mangled.
Current Rhino Version: 8.18.25100.11001
Differences in old and new .rui files
Previously, the .rui file would be unchanged when added to the .yak file, but now it seems as though it gets modified during the plugin build process. The original file starts like:
<?xml version="1.0" encoding="utf-8"?>
<RhinoUI major_ver="5" minor_ver="0" guid="some-guid">
but the new one packaged with the plugin starts like:
<?xml version="1.0" encoding="utf-8"?>
<RhinoUI guid="guid-of-plugin" plug_in_guid="guid-of-plugin" major_ver="8" minor_ver="0" localize="False" default_language_id="1033">
Not only did the version number change, but the guids changed too. Additionally, the <tool_bar_groups>
tag is now populated, where it wasn’t previously, the <tool_bars>
tag is completely different (it only contains 1 toolbar instead of the several that I’d had), and the <macro>
tag has its items changed too. Tooltips and menu texts are overwritten with a default, guids and bitmap ID’s are changed, and the <text>
tags are all different (previously they were of the form Macro N
where N
is a number, but now they’re Macro.Name
, where Name
seem to be connected to the command that gets run). The <icons>
are all reset to a stock SVG, replacing all of the SVGs from within the old .rui file. I had the following <bitmaps>
tag, but now it’s been completely emptied:
<bitmaps>
<small_bitmap item_width="0" item_height="0" />
<normal_bitmap item_width="0" item_height="0" />
<large_bitmap item_width="0" item_height="0" />
</bitmaps>
Here’s my current .rui file, for reference: toolbar.rui (61.3 KB)
And the mangled version that gets bundled into the plugin: mangled.rui (510.7 KB)
UPDATE: I did some more testing, and it looks like it doesn’t actually change the existing toolbar like I’d initially thought. Instead, it creates a new one that gets bundled into the plugin. This takes precedence over the toolbar that gets put into the shared/
folder. Is there some way for me to make the one in the shared/
folder the default (or to have it not create the unusable toolbar)?