THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/03/2005 at 08:07, xxxxxxxx wrote:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C++ ;
this is my first post here, but I think it won't be the last;-)
During the last few days I have been reading through the SDK documentation and I also have done my first steps with the SDK. So far, all my test worked all fine with the help of the examples. But since Im going to do some rather large project I would like to have some better understanding of the overall architecture of the SKD. So here my questions:
1. When you create a plugin you have to derive your class from ???Data (where ??? is the chosen plugin type). But for every of the plugin types there also exists a Plugin??? class. How are these two actually connected? Is it correct to say, that the ???Data classes handle everything what has to do with user interaction (editor interactivity, attribute manager) and that the Plugin??? classes are responsible for storing the data?
2. Another question that arises there: normally for your plugin you have to derive a class from ???Data. But what if you would like to extend let's say for example the PluginSceneHook (I have chosen this one, because I stumbled across the TP_Mastersystem which is derived from PluginSceneHook) and you want your SceneHookData-Plugin to have this new class as the node parameter instead of the more general PluginSceneHook. How would you actually do that?
3. One last but therefore a more concrete question: in the documentation it says about the Init(..)-Function of the NodeData class: "Called when a new instance of the node plugin has been allocated. You can use this function to ..."
But when are actually new instance of the node plugin created? The reason why I ask this: I have done a little test with the ObjectData-Plugin and I wanted to perfom some action every time the user creates the object from the menu and only then. But it turned out (I placed a GeDebugOut in the init-function) that this is also called when you change any of the base-properties in the AM. Okay, I found out that you can do this by using the Message-function and checking for MSG_MENUPREPARE. But Im still wondering, why is there a new instance created with every base-attribute change?
Thanks in advance,