插件许可手册
This manual contains information with regard to the new Cinema 4D R21 licensing functions that have been introduced to substitute the previous classes / methods available in earlier versions.
More specifically the following class has been removed in Cinema 4D R21:
在 Cinema 4D R21 the following functions have been introduced and are detailed later on:
It must be noted that the new mechanism is not replacing the old one and doesn't grant the same level of functionality.
It has been designed to grant:
It has NOT been designed to grant:
With Cinema 4D R21 a new licensing workflow has been envisioned for plugin vendors willing to license their product for Cinema 4D .
The basic workflow can be streamlined as:
A slightly more automated scenario (which is the one adopted in the example below) could be:
Both described scenarios don't rely on any online activation mechanism but extending them to grant this functionality shouldn't be too hard. With regard to this a potential workflow might be:
With Cinema 4D R21 each configuration is connected to a specific product ID. This is a complete overview over all currently existing Id's:
net.maxon.license.app.cinema4d-release~commandline
: C4D (release binary) running in command-line mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
net.maxon.license.app.cinema4d-release~commandline-floating
: C4D (release binary) running in command-line mode with a license provided either by MAXON License Server or RLM Server ;
net.maxon.license.app.cinema4d-release~commercial
: C4D (release binary) running in standard mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
net.maxon.license.app.cinema4d-release~commercial-floating
: C4D (release binary) running in standard mode with a license provided either by MAXON License Server or RLM Server ;
net.maxon.license.app.cinema4d-release~education
: C4D (release binary) running in educational mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
net.maxon.license.app.cinema4d-release~education-floating
: C4D (release binary) running in educational mode with a license provided either by MAXON License Server or RLM Server ;
net.maxon.license.app.cinema4d-release~lite
: C4D (release binary) running in Lite mode with license provided by the global MAXON Provisioning Infrastructure (idmaxon.net);
net.maxon.license.app.cinema4d-release~nfr
: C4D (release binary) running in Not For Resale (NFR) mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
net.maxon.license.app.cinema4d-release~trial
: C4D (release binary) running in Trial mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
net.maxon.license.app.teamrender-release~commercial
: TeamRender Server (release binary) running in standard mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
net.maxon.license.app.teamrender-release~commercial-floating
: TeamRender Server (release binary) running in standard mode with license provided by MAXON License Server or RLM Server ;
net.maxon.license.app.teamrender-release~education
: TeamRender Server (release binary) running in educational mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
net.maxon.license.app.teamrender-release~education-floating
: TeamRender Server (release binary) running in educational mode with license provided by MAXON License Server or RLM Server ;
net.maxon.license.app.teamrender-release~nfr
: TeamRender Server (release binary) running in Not For Resale (NFR) mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
net.maxon.license.app.teamrender-release~trial
: TeamRender Server (release binary) running in Trial mode with license provided by the global MAXON Provisioning Infrastructure (id.maxon.net);
They all have the format net.maxon.license.app.XXX-release~YYY[-floating] where
and -floating is optional.
With the new Cinema 4D R21 API Licensing calls, it possible to generate a report of Cinema 4D license data to be used by plugin vendors to generate their plugin licenses against to. The data stored in the report can be disclosed to plugin vendors since no sensitive data or license keys are part of the report
A typical report, is a JSON-structured container and looks like:
{ "userid" : "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" , "systemid" : "01234567890" , "name" : "A name" , "surname" : "A surname" , "version" : "21.022" "currentproduct" : "net.maxon.license.app.cinema4d-release~commercial" , "accountlicenses" :{ "net.maxon.license.app.cinema4d-release~commandline-floating" :10, "net.maxon.license.app.teamrender-release~commercial-floating" :10, "net.maxon.license.app.cinema4d-release~commercial-floating" :10, "net.maxon.license.app.cinema4d-release~education-floating" :10, "net.maxon.license.app.teamrender-release~education-floating" :10, "net.maxon.license.app.teamrender-release~commercial" :5, "net.maxon.license.app.cinema4d-release~commercial" :5 } }A few notes:
userid
is a unique identifier directly bound to the user account used to login in id.maxon.net;
systemid
is a unique identifier directly bound to the hardware used when the license report was generated; the id stays constant as long as potential changes to hardware configuration are limited;
name
is the Customer name bound to the user ID;
surname
is the Customer surname bound to the user ID;
version
is the
Cinema 4D
version that was running when the report was generated;
currentproduct
is the
Cinema 4D
product configuration that was running when the report was generated;
accountlicenses
is a dictionary containing the different
Cinema 4D
product configurations owned by the user ID and their quantity.
accountlicenses
is optional and only present if
Cinema 4D
is running with valid account logged-in.
The report can be conveniently managed by using the maxon::JsonParserInterface class.
Considering the structure of the report, if a plugin needs to be deployed in a render-farm or on multiple machines, it's likely the Customer to provide the plugin Vendor with as many reports as the number of machines supposed to use the plugin.
At the same time it's on the plugin Vendor to eventually generate a license which can be validate independently of the system ID or independently of the user ID or independently on the product ID.
These considerations are left to the plugin vendor designing his own licensing scheme.
Due to the renewed business model, Cinema 4D R21 doesn't rely anymore on serial numbers for validating the license but rather introduces a new authentication mechanism based on account-related online activation.
Because of this new approach, Cinema 4D can be provided with a valid licenses by:
Cinema 4D R21 introduce the following global functions to query Cinema 4D about its licensing status, to programmatically generated Cinema 4D License Report or to check for a specific feature.
// query Cinema for the values in use in the current session GetGeneralLicensingInformation (productID, systemID, userID, licenseID, userName) iferr_return ;
// print the IDs DiagnosticOutput ( "UserID:\t\t@" , userID); DiagnosticOutput ( "SystemID:\t@" , systemID); DiagnosticOutput ( "ProductID:\t@" , productID);
// check passed argument if (c4dLicenseReport.IsEmpty()) return maxon ::UnexpectedError( MAXON_SOURCE_LOCATION , " C4D License report is empty."_s);
// create a JSONParser reference const maxon ::JsonParserRef jsonParser = maxon ::JsonParserRef::Create() iferr_return ;
// allocate a SingleValueReceiver to store the data read from the JSONParser; maxon ::SingleValueReceiver<const maxon ::DataDictionary&> readData;
// parse the string and check it's containing a valid JSON structure jsonParser.Read(c4dLicenseReport, maxon :: JSONPARSERFLAGS :: NONE , readData) iferr_return ;
// return the data in the form of a maxon::DataDictionary const maxon ::DataDictionary licenseDict = readData. Get ().GetValue() iferr_return ;
// print the retrieved C4D License DataDictionary DiagnosticOutput ("-- Cinema 4D License Report DataDictionary --\n @", licenseDict);
// init to the product ID string (e.g. net.maxon.license.app.cinema4d-release~commercial) internedID. Init (productID) iferr_return ;
// check if product/feature is allowed const maxon::Bool isProductAllowed = CheckLicenseFeature (internedID);