How to create python plugin in 2024?
-
Howdy,
I feel kinda dumb asking this, but since there doesn't seem to be a working version of ResEdit, I fear I no longer recall the correct ways to set up and create a proper python plugin now? Like how does the c4d_symbols.h get created? The descriptions and all of that now without resEdit? Is there a link or tutorial for getting started. How does one generate the proper resource files, not just for ui elements, but just the normal c4d_symbols.h, or any other resource file?
-
Hello @BretBays,
for me it's a matter of looking through the documentation and the samples on GitHub (I can especially recommend the Rounded Tube). I create all the .h and .res files for my plugins by hand.
The C++ documentation is definitely more in-depth especially when it comes to Description Resources and there's generally a lot in there you can just carry over to Python. Still there's a lot to just kind of figure out as you go and a lot of digging through the forums.
To be completely honest I feel like there should be a guide to get started since there's a lot you can mess up while getting not very descriptive errors especially with the .res files. I'm interested to see what the others say, maybe I'm just making a mountain out of a molehill.
Cheers,
Daniel -
That is sort of what prompted the question. I'm developing a toolData plugin, and was looking at an example, but that leads to renaming classes in the code and such, but there doesn't seem to be any tool or anything ensure that the res files get renamed properly. ResEdit was very nice because in addition to helping visualize the gui elements, it managed the generation of those res files for you.
-
Hi @BretBays,
there's no special tool for managing header and resource files in a visual way. As Daniel has already correctly pointed out, one normally creates them from scratch based on some already existing files, e.g. from our github repository (python, c++). Please find the links to our C++ docu and Description Resource manual in the previous Daniel's posting.
Cheers,
Ilia -
Yes, download the SDK and study the examples.
I wrote my own software that allows me to simply select the type of plugin I want to create, enter the plugin ID and the plugin name. The program then creates the folder structure, all files with the correct content and the correct name automatically...that was the first thing I did because it is always extremely tedious.
This then takes 10 seconds and I have a finished blueprint. Then I can start programming straight away.
I usually make the Gui first using UserData to roughly create the design and then I write it down in the resfile in no time at all. It's relatively quick and even fun and you gradually grow into it, it emerges little by little.....Basically it wouldn't be a problem to write a script that writes the UserData interface into a Res, header and string file, I already have an idea for that... That would actually be easy to do.
I'll get to it when I'm done with my update... and then maybe make it available to the community... However, a similar one is already there, but I can't remember where.Greetings
Tom -
@ThomasB said in How to create python plugin in 2024?:
Yes, download the SDK and study the examples.
I wrote my own software that allows me to simply select the type of plugin I want to create, enter the plugin ID and the plugin name. The program then creates the folder structure, all files with the correct content and the correct name automatically...that was the first thing I did because it is always extremely tedious.
This then takes 10 seconds and I have a finished blueprint. Then I can start programming straight away.
I usually make the Gui first using UserData to roughly create the design and then I write it down in the resfile in no time at all. It's relatively quick and even fun and you gradually grow into it, it emerges little by little.....Basically it wouldn't be a problem to write a script that writes the UserData interface into a Res, header and string file, I already have an idea for that... That would actually be easy to do.
I'll get to it when I'm done with my update... and then maybe make it available to the community... However, a similar one is already there, but I can't remember where.Greetings
TomYeah, that sounds cool. The ui stuff you're mentioning was very similar to how the old ResEdit plugin worked. the source code is on gitHub, but I don't know how to compile C++ plugins.
But I guess there is nothing there. This stems from me copying one of the examples from the Python SDK and trying to make it my own. It hasn't been very intuitive for me, which is why I asked because I figured I must have been missing something, but it seems I am not.