Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search

Dialog code in CoreMessage on new scene.

Author
Message
  Topic Search Topic Search
peterakos View Drop Down
Member
Member


Joined: 2015 Jul 13
Online Status: Offline
Posts: 349
Direct Link To This Post Topic: Dialog code in CoreMessage on new scene.
    Posted: 2018 Jan 26 at 3:51am

User Information:

Cinema 4D Version:   R18 
Platform:   Windows  ;   
Language(s):     C++  ;   

---------

Hello.

I have a dialog that implements CoreMessage. Whenever a user creates a new scene via File > New, I need this dialog to run some initialization code if it is still open.
EVMSG_DOCUMENTRECALCULATED is not triggered. How can I do that ?

Thank you for your time.

Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1878
Direct Link To This Post Posted: 2018 Jan 30 at 6:27am
Hi,

you can check BFM_CORE_UPDATECOMMANDS, but you'll receive this not only when a new document is created. So you need to check yourself, if the document changed.
Int32 MyDialog::Message(const BaseContainer& msg, BaseContainer& result)
{
switch (msg.GetId())
{
case BFM_CORE_MESSAGE:
{
const Int32 coreId = msg.GetInt32(BFM_CORE_ID);
switch (coreId)
{
case BFM_CORE_UPDATECOMMANDS:
GePrint("    BFM_CORE_UPDATECOMMANDS");
break;
default:;
}
break;
}
default:;
}
return SUPER::Message(msg, result);
}

Cheers,
Andreas
SDK Support Engineer
Back to Top

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.