Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developer:zoorhinoplugin [2020/11/25]
sandy [Rhino Plug-in Sample]
— (current)
Line 1: Line 1:
-====== Creating Rhino C++ Plugins that use the Zoo ====== 
-> **Developer:** //[[developer:zoo|Zoo 5.0]]// 
-> **Summary:** //Discusses how to create Rhino 5.0 plugins to obtain licenses from the Rhino license manager and the Zoo.// 
- 
-===== Overview ===== 
-Zoo 5.0 allows 3rd party plugin developers to add licensing support for their products to the Zoo. 
- 
-The Rhino 5.0 C++ SDK allows developers to write plugins for Rhino that use the Rhino license manager and obtain licenses from Zoo servers. 
- 
- 
-===== Requirements ===== 
-Rhino C++ plugins are MFC dynamic link libraries. Thus, to create a plugin for Rhino, you will need one of the following development tools: 
- 
-  - Microsoft Visual C++ 2005 (required for Rhino 5.0 32-bit) 
-  - Microsoft Visual C++ 2010 (required for Rhino 5.0 64-bit) 
-  - Rhino 5.0 C++ SDK 
- 
-Note, the Express Editions of Microsoft Visual Studio will **not** work, as they do not include MFC. 
- 
-Also, all Rhino plugins that use the Rhino license manager to access the Zoo must be signed with an Authenticode certificate issued by McNeel Plugin Security. These certificates are free but must be requested by each developer. Developers must agree to the //Terms of Use// before a certificate is issued.  
- 
-===== Creating a Rhino C++ Plugin ===== 
-The following are the general steps required to create a Rhino plugin.  
-  - Make sure you have Rhino 5.0 installed. 
-  - Make sure you have the Rhino 5.0 C++ SDK installed. 
-  - Launch Microsoft Visual Studio 2010. 
-  - Create a new project, in C++, based on the **Rhino 5.0 Plugin** project template. 
-  - Build your plugin. 
-  - Launch Rhino and use **PlugInManager** to install your plugin (to verify that it was correctly built). 
- 
-===== Adding Licensing Support to your Plugin Project ===== 
-After you have built and tested your basic plugin, you can add licensing support as follows: 
-  - Add a new .CPP file to your project. 
-  - In this .CPP file, declare a new class that is derived from **CRhinoLicenseValidator**. 
-  - Override the **CRhinoLicenseValidator::ProductBuildType** virtual function and return the build type of the license that your product requires. 
-  - Override and implement the **CRhinoLicenseValidator::ValidateProductKey** virtual function. Rhino will call into this function whenever it needs your plugin to validate a license that is entered by a user, returned by the Rhino license manager (standalone node), or returned from a Zoo server (network node). For details, see the example Rhino C++ plugin listed below. 
-  - Create one (and only one) static instance of your object. 
-  - In your plugin' **CRhinoPlugIn::OnLoadPlugIn ** member, call  **CRhinoPlugIn::GetLicense** to get a license. 
-  - Build your plugin. 
-  - [[developer:digital-signatures/create-request|Digitally sign your plugin.]] 
-  - Launch Rhino and test your plugin. When you load your plugin for the first time, you will be prompted to enter a license. 
-{{:developer:licensenotfound.png|}} 
- 
-===== Managing your License ===== 
-Rhino plugins that use the Rhino license manager appear in the Licenses page of the Options dialog. Here, the user is allowed to view and manage the license. 
- 
-{{:developer:licensetools.png|}} 
- 
-===== Rhino Plugin Sample ===== 
-[[https://github.com/mcneel/Zoo5|Sample Rhino 5 C++ plugin project on GitHub]] 
- 
-\\ 
- 
-{{tag>Developer zoodev}} 
  
developer/zoorhinoplugin.1606321947.txt.gz ยท Last modified: 2020/11/25 by sandy