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
Next revision Both sides next revision
developer:zoorhinoplugin [2020/11/25]
sandy [Creating a Rhino C++ Plug-in]
developer:zoorhinoplugin [2020/11/25]
sandy [Rhino Plug-in Sample]
Line 1: Line 1:
 ====== Creating Rhino C++ Plugins that use the Zoo ====== ====== Creating Rhino C++ Plugins that use the Zoo ======
 > **Developer:** //[[developer:zoo|Zoo 5.0]]// > **Developer:** //[[developer:zoo|Zoo 5.0]]//
-> **Summary:** //Discusses how to create Rhino 5.0 plugins that can obtain licenses from the Rhino license manager and the Zoo.//+> **Summary:** //Discusses how to create Rhino 5.0 plugins to obtain licenses from the Rhino license manager and the Zoo.//
  
 ===== Overview ===== ===== Overview =====
Line 29: Line 29:
   - Launch Rhino and use **PlugInManager** to install your plugin (to verify that it was correctly built).   - Launch Rhino and use **PlugInManager** to install your plugin (to verify that it was correctly built).
  
-===== Adding Licensing Support to your Plug-in Project ===== +===== Adding Licensing Support to your Plugin Project ===== 
-After you have built and tested your basic plug-in, you can add licensing support as follows:+After you have built and tested your basic plugin, you can add licensing support as follows:
   - Add a new .CPP file to your project.   - Add a new .CPP file to your project.
   - In this .CPP file, declare a new class that is derived from **CRhinoLicenseValidator**.   - 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 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 plug-in 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++ plug-in listed below.+  - 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.   - Create one (and only one) static instance of your object.
-  - In your plug-in' **CRhinoPlugIn::OnLoadPlugIn ** member, call  **CRhinoPlugIn::GetLicense** to get a license. +  - In your plugin' **CRhinoPlugIn::OnLoadPlugIn ** member, call  **CRhinoPlugIn::GetLicense** to get a license. 
-  - Build your plug-in+  - Build your plugin
-  - [[developer:digital-signatures/create-request|Digitally sign your plug-in.]] +  - [[developer:digital-signatures/create-request|Digitally sign your plugin.]] 
-  - Launch Rhino and test your plug-in. When your plug-in is loaded for the first time, you will be prompted to enter a license.+  - 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|}} {{:developer:licensenotfound.png|}}
  
 ===== Managing your License ===== ===== Managing your License =====
-Rhino plug-ins 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.+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|}} {{:developer:licensetools.png|}}
  
-===== Rhino Plug-in Sample ===== +===== Rhino Plugin Sample ===== 
-[[https://github.com/mcneel/Zoo5|Sample Rhino 5 C++ plug-in project on GitHub]]+[[https://github.com/mcneel/Zoo5|Sample Rhino 5 C++ plugin project on GitHub]]
  
 \\ \\