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

    Intercepting Messages

    SDK Help
    0
    4
    348
    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 16/01/2013 at 09:36, xxxxxxxx wrote:

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

      ---------
      Hello all,

      I've been trying to figure out how to interrupt  a message from Cinema and then have it preform a different  action instead of what it's supposed to do.

      So for example, I have a tag plugin and I select an object, and instead of selecting the object as would be expected, a sphere is created.  I assume this is done in the Message function but I haven't been able to find the correct Message ID and I can't figure out how to stop Cinema from doing the action it's supposed to.

      Any advice where to look/start?

      Thanks,
      Dan

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

        On 16/01/2013 at 12:12, xxxxxxxx wrote:

        hm,

        at least pluin messages are being consumed by returning true, but i do not think that is how
        coremessages do work. on top of that, i am not so much into all this core stuff, but i do not think
        that it is possible to supress certain actions with this approach, as c4d is stritly oo. there is no
        central 'hub' recieving messages and then executing things.

        if there is an way to do this, i think you will have to look into a SceneHook plugin. but i think it
        depends on what you are after. for your example it would be enough to listen for selection 
        changes in your plugin and when such an event occurs, restore the last selection and insert
        a sphere.

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

          On 17/01/2013 at 09:43, xxxxxxxx wrote:

          I couldn't find any ID explicitly sent because the object was selected, at least not from
          NodeData::Message(), therefore I assume it is not possible to break into this procedure.

          Best,
          Niklas

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

            On 21/01/2013 at 11:37, xxxxxxxx wrote:

            Sorry about the late response, busy with other C4D stuff! Thank you both for helping, that's what I was afraid of Niklas.  I'll look into a SceneHook plugin, Ferdinan.

            What I currently have is a Tag plugin that when the selection is changed, the current selection changes to a object I set.  But I wanted to try to get rid of the brief blip where the object the user selected is actually selected before it switches to what I want selected.  If that makes sense.

            Thanks for the help,
            Dan

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