Are PluginStart() and PluginEnd() only for C++ plugins?
heilei last edited by heilei
Maxon's Python plugin structure page
mentions three different API calls PluginStart(), PluginEnd() and PluginMessage() in the message ID section. However, all the Python examples that I've found only implement PluginMessage(). Does this mean, that only PluginMessage() applies to Python plugins, and the other two are for C++ plugins only? I wrote a small Python test plugin with all three functions, and only PluginMessage() was ever called (with different message IDs).
I have tried to find some verification for this in Maxon's SDK documentation but haven't found anything so far (but I'm pretty new with this, so I might have missed something relevant...)
mp5gosu last edited by mp5gosu
This post is deleted!
r_gigante last edited by
Hi @hellei, thanks for reaching out us.
With regard to your question, although the documentation mentions
PluginEnd()respectively with regard to C4DPL_INIT and C4DPL_END, both functions and messages are not supported on Python due to design of the Python implementation on Cinema which is - in the end - itself a plugin.
I instead suggest - in
C4DPL_ENDACTIVITYwhich are indeed supported and fired across the lifecycle of the plugin.
Finally please note that to you have to register your plugin in the
mainpython function rather than in the PluginStart as done in C++
... if __name__ == "__main__": c4d.plugins.RegisterCommandPlugin(..., ..., ..., ..., ..., ...) ...
heilei last edited by
Ok, got it. Thank you for your reply and clear explanation, r_gigante, much appreciated!