On 05/07/2018 at 01:45, xxxxxxxx wrote:
I'd like to read data from zipped text files via a Python plugin and create rigged objects with Xpresso driven morphs. All needed data are available in this collection of text files. This will be my first plugin.
I'm aware that this is a longtime project, but I really want to start with that. Unfortunately the information about writing Python plugins for Cinema 4D is quite cluttered and quite old, so I'd love to get some hints, where to start, as I didn't find an in-depth tutorial about what I need to start with.
Any hints or recommendations? Any tutorials (paid or free) that can be recommended?
Thanks a lot in advance
On 06/07/2018 at 02:51, xxxxxxxx wrote:
Regarding your first question, the c4d SDK does not offer any way to manage zip file. But python offers it through the zipfile module. But we can't offer you support for 3rd party stuff, so if you have questions regarding zipfile module you should ask them on another forum like stackoverflow
With that said, if I understand correctly you want a one execution thing(a user press a button/menu and it does the import). For that, you can simply make a script, or either a CommandData plugin.
But if making a plugin afraid you, you can make a script and then convert it to a plugin using the prototype converted.
Then the creation of an object can be done using BaseObject. To understand the concept of BaseObject I let you read the C++ manual (don't be afraid C++ code and python is pretty similar, the most important is to understand the concept)
About tutorials since as you can imagine C4D SDK is pretty big and cover a lot of topics, there is nothing that resumes everything, but some resources are linked in this page Public resource
But in all case, the way to success is going step by step, and solve problems step by step. So please do not hesitate to come to us for any questions!
On 06/07/2018 at 10:58, xxxxxxxx wrote:
Thanks a lot for your fast response. I have some character files that I analyzed in the last 2 years and really want to find a way to import them into Cinema 4D with as much features as possible. I did it manually, but I'd like to automate it, as doing it manually takes several hours. Taking the script route for a start is definitely a good hint.
Your answer is quite helpful and I really want to share my findings, if someone is interested here. Thanks again :)