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

    Messages, and access to top level - help!

    SDK Help
    0
    3
    603
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 15/01/2003 at 03:39, xxxxxxxx wrote:

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

      ---------
      I've got a plugin that needs to be called (before redraw) whenever we are in edit mode and the point data for the active object has changed in any way, and I'm having problems...

      My current plan is:
      1. Use a MessageData plugin type, and detect EVMSG_CHANGE messages using 'CoreMessage' method.
      2. Check that we are in edit mode, else exit.
      3. Check that an object is selected, else exit.
      4. Check that object is poly, else exit.
      5. If needed, recalculate my data which is stored in object's base container.
      6. Exit.

      Two questions:
      1. Is there a more specific message I should be checking for that will generate less 'false alarms', or am I checking in the wrong way anyway?
      Note: The 'MSG_Atom' enum has a 'MSG_POINTS_CHANGED' value, but I don't understand the messaging system enough to know how/whether I can detect that happening...

      2. Having recieved an EVMSG_CHANGE core message, how do I then get a pointer to the current document, so I can actually get at the current object and do the rest of the processing. I'm sure I've missed something totally obvious, but the 'MessageData' plugin doesn't seem to contain pointers to anything else. How do I get a pointer to the current document?

      Any help much appreciated...

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 16/01/2003 at 17:59, xxxxxxxx wrote:

        MSG_POINTS_CHANGED is unfortunately only sent to the active object and its branches (i.e. its tags and tracks). It's not possible to get this message in a message plugin.
        I think since core messages are always global you can safely use GetActiveDocument() to get the document.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 18/01/2003 at 09:21, xxxxxxxx wrote:

          Ok, thanks.

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