Using a Skin

Hi,

I’m trying to use a skin in my plug-in, but i’m facing a couple of problems.

First, I followed all the steps in the different topics and examples and I have managed to get it working in Rhino 64bit, but not in 32 that is my real target.

I have noticed that in the registry, in HKEY_LOCAL_MACHINE, Rhino only creates an entry for “5.0x64”, but not for “5.0”, like it does in “HKEY_CURRENT_USER” for example, so I can only set the “SkinDLLPath” in the “5.0x64”.

I tried to manually create a “5.0” entry and set the “SkinDLLPath” there too, but didn’t worked.

The other doubt I have is concerning the PersistentSettings. If I want my plug-in to be launched with a particular set of options, do I have to modify these settings in the registry entry for my scheme? or can I use the PersistentSettings class in someway to achieve this? If not, what can I use this class for?

Thanks, Chema

On a 64-bit version of Windows running 32-bit Rhino 5, you will need to add the registry entry in the Wow6432Node key of HKEY_LOCAL_MACHINE.

Thank you, It works now. Any insight about the PersistentSettings?

Rhino stores persistent settings in “Scheme” keys found in HKEY_CURRENT_USER (for the currently logged in user). If you want your plug-in launched with a set of settings, then you plug-in should recognize the first time it is loaded, in a particular scheme, and then set whatever settings are required.

I tried to change some registry values for the scheme using the persistent settings object of the skin, but it seems they are not interconnected.

I don’t want to change the values directly in the registry because the program would need to be launched with administrator privileges.

Ideally, this key would be created by an installer.

That is correct, the PersistentSettings class and the registry are not connected.

The problem arises when the skin doesn’t exist in the installation. I create only the folders and keys needed for the parameters I want to change in the current user. These are:

Options->DisplayAttributesManager->ff608b97-81d3-4186-831c-41f7dc140881->Objects->Meshes->ShowMeshWires->n
Options->DisplayAttributesManager->ff608b97-81d3-4186-831c-41f7dc140881->Objects->Surfaces->ShowIsocurves->n

But when I launch Rhino with the skin the first time (and the skin is created correctly) these values get overwritten.

I don’t believe these values are being overwritten. Rather, these values do not exist in the scheme being used.

More on Rhino Schemes:

http://wiki.mcneel.com/rhino/schemes

Ok, I solved all of this using a .reg file. Thank you!!