Skin Plugin Setup

I’m delving into customising the look and feel of Rhino through a skin plugin, custom toolbars, editing the plugin scheme, and using an installer. I’ve gone through the some of the guides and samples:

I’m using Visual Studio Windows Installer Project to create the installer.

So far so good, but a few questions:

  1. How do you install .3dm templates? Is it as simple as adding the templates to the installer and then adding them to the AppData\Roaming\McNeel\Rhinoceros\7.0\Localization\en-US\Template Files during install?

  2. How do you create and install custom schemes? Do I setup Rhino with the settings I want, add the resulting settings-Scheme_MyPlugin.xml to installer, and copy to the users AppData\Roaming\McNeel\Rhinoceros\8.0\settings folder on install? Do I need to modify the registry to make Rhino recognise it? If a user edits their setup, what is the best way to “Reset to Plugin Defaults”? Or should my plugin handle the settings?

  3. Similar to above, but with custom display modes…

Being cheeky and tagging you @jstevenson because you seem to be the guru here…

Any advice is appreciated --either for the questions or more generally about creating custom Rhino setups!

Cheers,

– Luke

1 Like

Luke,

  1. Here is how we handle document templates, we have our own UI that executes this code to start a new document:
    image

We maintain the users preference for Templates, and also have our own default template that ships with the software.

When the plugin loads, we set the Template to use:
image

  1. Regarding Schemes, we do 2 steps in our installer to enable our scheme, the first step is to import into the registry the SkinDLLPath value that points Rhino to our skin DLL when it runs using our scheme.

Essentially our Installer is setting the values, equivalent to this *.reg file:

The second part of this, is to insure that Rhino is started using the Scheme specified now in the Registry, so we create shortcuts that pass the scheme parameter to rhino, this does two things for us, it triggers Rhino to run with our Skin, which then in turn we are using the OnBeginLoadAtStartPlugins() override to load our main plugin.

image

  1. The third question on Display Modes, we handle by deploying the Display Modes that we’ve created from within Rhino to our install folder, and then check for and import them at run-time. You can create the display modes, and export them as *.ini files.

I’ve written this code to dynamically get a list of display modes that we want to look for on startup:

And we load the DisplayModes like this:

Hope this helps.

Jason

1 Like