THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/05/2005 at 07:02, xxxxxxxx wrote:
Cinema 4D Version:
Platform: Windows ;
Language(s) : C++ ;
Where's the spot in a plug to place (intro)splashscreen code ?
On 18/05/2005 at 08:47, xxxxxxxx wrote:
When do you want the splash to display? During Cinema 4D startup or plugin startup?
This might get tricky if your plugin uses a non-modal, dockable dialog. It may be run during startup (Restore()) in which case the splash will always show then for users doing this.
I would think that Execute() or just before wherever it is that you open your dialog (or start processing with the plugin). Probably best to be non-modal if it will possibly interfere with other activity (C4D startup).
On 18/05/2005 at 11:12, xxxxxxxx wrote:
Your right, there are some side-effects.
I now do have a modal, in init (tag-Plug), with a global passcounter, so as far as i can see now, it only shows up once.
What do you think ?
On 18/05/2005 at 12:38, xxxxxxxx wrote:
I take it that the global counter is to avoid those unavoidable Cinema replications? Init() seems to be a good place. Is this splash on a timer (shows for a few seconds, for instance) or on a user event (user clicks mouse on it or somewhere to remove it)?
On 18/05/2005 at 13:32, xxxxxxxx wrote:
Yes, your right about the counter.
Its a modal, so the user must click ok/cancel.
It seems to function fine.
On 18/05/2005 at 13:51, xxxxxxxx wrote:
I hope this is for a demo version, otherwise a modal splash screen sounds very intrusive. The best place for such a thing in a regular plugin would be in the About menu item.
If you want the splash to occur on the first use of your plugin, so that it doesn't appear in every session, then the Init() function is a good way to initiate the splash. However, the dialog must not be opened from there. In R9+ the scene preparation code is executed in a thread. I learned the hard way with MSA that having dialogs in there can cause subtle crashes. What's worse was that these crashes only occured in the demo version, so I didn't spot them during testing.
This is the way I do it in my updated, R9 safe, demo versions:
const LONG DEMO_MESSAGE_ID = ...;
class MSADemoMessage : public MessageData
virtual Bool CoreMessage(LONG id, const BaseContainer& bc)
"MSA Demo Message", 0,
void DoMessageDialog(LONG id)
SpecialEventAdd(DEMO_MESSAGE_ID, id, 0);
if (demo && firsttime)
Since the dialog is called via a core message it's always thread safe.
On 19/05/2005 at 02:44, xxxxxxxx wrote:
It's a demo indeed. But pretty intrusive yes.
But the 'subtle crashes' must be my problems with the colliding ID in the different versions of C4D.
I've got the message, thanks.