Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    CheckCoreMessage returns always false

    SDK Help
    0
    2
    697
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 23/04/2018 at 01:47, xxxxxxxx wrote:

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

      ---------
      Hello.

      In a custom thread, I call SpecialEventAdd(id, p1, p2) and I have a dialog that is supposed to process this event. 
      The problem is that for some reason CheckCoreMessage returns false even thought the event has not been already processed. 
      What can I do to properly handle the special event ?

      Thank you.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 24/04/2018 at 07:36, xxxxxxxx wrote:

        Hi,

        hard to say, but maybe it helps to provide some background info.

        SpecialEventAdd() posts an event into a queue. In certain intervals in the main thread these events will be processed and distributed. When doing so, the events get a timestamp (a counter in BFM_CORE_UNIQUEID). This timestamp is identical for all events distributed in one interval.

        CheckCoreMessage() checks a timestamp of the event and stores it in a member variable of the GeDialog (if ownlastcoremsg parameter is not provided).
        This might already be an issue in your case. For example, if a bunch of events pile up, only the first would pass CheckCoreMessage() as all following would have the same timestamp (even though the events are of different type).

        A solution may be to do CheckCoreMessage() based on event type and store the last timestamp on your own (via ownlastcoremsg parameter).

        Let me know, if this helped.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post