The examples Maxon has in GitHub include "Py-TextureBaker", which seems to use threads. I'm currently going through that code (and trying to understand it...), because I'm facing the exact same challenge as OP: how to start something in a thread, and make that thread send messages to other plugins.
A big thumbs-up for this! I've also started using Python typing in PyCharm, now that C4D API is finally based on Python 3. Having correct typing also in the dummy package would be really useful.
Ok, thanks for the clarification.
CTrack documentation talks about ”index” a lot, when referring to keys, but I haven’t yet found any definite specification for it. Are the keys indexed in what order? Time? Order of insert? Random? Does the index start from 0 or 1?
Thank you, Cairyn. When you document method "SplurgeMiddlePhalange()" with "this method splurges your middle phalange", you're not really helping anyone...
A followup question: is there a way to get the time and/or value of previous/next keyframe of a CKey (on the same track)? I was hoping these mysterious left/right methods would do that, but apparently not.
Could someone please enlighten me: what exactly do these Python CKey left/right methods do? The documentation is somewhat... vague (the text below is taken directly from Maxon's Python API documentation pages).
CKey.GetTimeLeft(self) : "Get the left time of this key"
CKey.GetTimeRight(self) : "Get the left time of this key"
CKey.GetValueLeft(self) : "Get the value of this key"
CKey.GetValueRight(self) : "Get the right of this key"
CKey.SetValueLeft(self, seq, v) : "Set the left value of this key"
CKey.SetValueRight(self, seq, v) : "Set the right value of this key"
CKey.SetTimeLeft(self, seq, t) : "Set the left time of this key"
CKey.SetTimeRight(self, seq, t) : "Set the right time of this key"
(as I've suggested before: Maxon should really REALLY put more resources in the API documentation quality)
Thanks for the drag'n'drop tip Maxime, that feature is extremely useful!
Thanks PluginStudent, that was a lot easier than I thought!
C4D's Python SDK has method c4d.documents.AddMarker(), which only allows you to enter the marker's name and time position. What about other marker attributes, such as length, color, note etc.: is it possible to modify them after the new marker has been created?
With kind regards,
I know this is an old topic, but just for the record...
The same thing seems to happen on macOS as well (Cinema 4D R21.207, macOS Catalina 10.15.3).
If xpos and ypos are -2 (i.e. show the dialog in the middle of the screen), and pluginID is not given as parameter, the dialog dimensions are about half of what they're supposed to be. If a pluginID is given, dialog dimensions are correct.