On 26/03/2018 at 04:56, xxxxxxxx wrote:
Hi Everyone!
Suppose you have a custom point object generator plugin, derived from c4d.plugins.ObjectData. Lets call it MyPlugin. It has some custom data and methods.
There is also a tool plugin which should operate on MyPlugin. In the tool plugin I would like to receive some internal data (like multiple spline objects) from my object plugin. So, I want to call a custom method like GetSomeCustomData() of MyPlugin. This is not possible from within the tool plugin because the tool operates on the selected object, which will be identified as a c4d.PointObject (which has no GetSomeCustomData() method).
I'm aware that I can use messages to communicate between objects, but is there a more direct way to access the data of my object plugin from within the tool plugin?
I tried to cast the c4d.PointObject to MyPlugin with selectedObj.__class__ = MyPlugin, but without success.
Any ideas?
Best regards
Tim