I'm looking for information on licensing a Cinema 4D plugin written in Python. I'd like to understand how to register the plugin in Cinema 4D's registration screen (similar to others I've used like X-Particles, UV Vonc, Riptide Pro, etc.)
I have a few questions:
Thanks for reading!
I cannot say much about licensing, because I have never done it. But there is a R21 example on github . And if I am not mistaken, you are binding your plugin to user IDs (at least that is an option) now and not serials, which should be persistent.
The screen you are showing was only available in c++ using SNHookClass
With R21 we introduced a new licence system for Cinema4D and we have included new functions to retrieve the user information about his licence.
We have this manual about the new licencing system.
Functions exist also in python like ExportLicences
As @zipit said we have a simple example on github, but you have to come with your own solution, it could be a licence file, a dialog box with a simple serial etc.
If you have any questions feel free to ask of course.
Thank you for your responses. @zipit , thank you for this example! That was very helpful. I am on R20, though, so I will need a solution that works for it too.
@m_magalhaes , I appreciate you letting me know that I cannot use the registration view with Python. I don't know if you saw in my original post, but I was already aware of the Plugin Licensing manual and ExportLicenses.
One of my questions is still unanswered: I'd like to develop a Python licensing system that works for both R21 and R20 and below. Would I be able to use the user's C4D serial number to create a plugin serial by this method? GeGetSerialInfo
The documentation says not to use it, but I don't have R21.
Yes you can create a system that works for R20 and R21. For R20 just create a hash key against the serial number, the last 5 digits is usually good enough, which you can get from the call you mentioned GeGetSerialInfo. Then for R21 just use their UserID or SystemID as mentioned in the other docs.
You can then create a license file for each user if they manually send you these keys (serial or user id), and they could place it in the folder for their plugin. You could also automate the generation of this license file depending on who you are selling with.
Most important however is that you encrypt your plugins so that they can't see how you are licensing them. I am not sure how well this works with python however.
@kbar Thank you for your response. That's really helpful, thank you.