THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/11/2009 at 17:03, xxxxxxxx wrote:
Cinema 4D Version: 11
Platform: Windows ;
Language(s) : C++ ;
Is there a particular MSG that is sent when a plugin is loaded? I would like for my CreateSun() function to be called right away when the plugin is loaded. I am trying to figure out if this can be done through the Message() but I cannot find a MSG that is sent immediately once the plugin loads.
Could someone please help?
Thanks a lot,
On 25/11/2009 at 23:37, xxxxxxxx wrote:
Do you really want that a sun is created as soon as your plugin is loaded?
Your plugin is loaded on each Cinema application start!
To me - and likely to most users - it's a certified bad idea to do something everytime Cinema ist started.
I would rather think of a command plugin that creates the sun, adds your plugin object etc. This is the way Maxon itself does it ("Create Sky..." command), and I would consider this as the way it should be done.
On 26/11/2009 at 06:38, xxxxxxxx wrote:
Yes, sorry.. That's what I meant. I would like the sun to be created when users add my plugin object ..
How would I do this?
On 26/11/2009 at 07:31, xxxxxxxx wrote:
Do it like Maxon itself does it - I doubt that there is a shortcut they don't know
Write a command plugin, which creates all the objects you need (see my remark about "Create Sky..."
On 26/11/2009 at 08:00, xxxxxxxx wrote:
Okay so to amend my original question... Is there a MSG that is sent when the object is added?
On 26/11/2009 at 09:05, xxxxxxxx wrote:
As far as I know, none that are unique to adding an object.
On 27/11/2009 at 06:09, xxxxxxxx wrote:
If you want to do something when the object is created, you could try doing that in the Init() function. But don't forget to check if the work is already done, otherwise it may happen that funny things happen when loading a scene containing that object.
On 27/11/2009 at 06:17, xxxxxxxx wrote:
I'll give that a try.
On 28/11/2009 at 09:27, xxxxxxxx wrote:
Forum keeps telling me there's not enough disk space to reply... ???