How to make a Python Plugin...

I always wanted to be able to convert Scripts to Plugins but didn't know how. Thanks to some great people, here is the bare minimum code required to make a Cinema 4D Python Plugin.
Save this as a .pyp file, and put it in a folder in the Plugins. It should appear in the Extensions menu.
Mind you, this ONLY functions like a Script, click-run-done. No UI, no Attributes, nothing...

There's a ton of other stuff you can read here:

import c4d
from c4d import gui

class HelloWorldCommand(c4d.plugins.CommandData):
    def Execute(self, doc):

        #Put your executable Code here...
        c4d.gui.MessageDialog("Hello World!")

        return True

if __name__ == "__main__":
        id=1059500, #Get Unique ID from
        help="put some Help test here...",

Hello @noseman,

Thank you for posting this. Readers should however keep in mind that this code snippet is bound to a plugin id (1059500) and therefore can only be registered once per Cinema 4D installation. To ship scripts to other users or to have multiple scripts packed up in this form, users must register a plugin each time they implement this skeleton.


Thank you @noseman!

@noseman said in How to make a Python Plugin...:

convert Scripts to Plugins

There is a nice solution to make it easy

Also a lot of Cinema 4D plugins examples for different cases are presented here

@mikeudin Have you managed to make the plugin converter work with the latest versions?
One of the reasons I started this thread was that I couldn't... hopefully it was some error I made.
If you have some information, please share.