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
    • Recent
    • Tags
    • Users
    • Login

    Receiving Plugin Messages

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 648 Views
    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 Offline
      Helper
      last edited by

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

      On 29/12/2009 at 14:25, xxxxxxxx wrote:

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

      ---------
      I have two plugins I am trying to get to talk to each other. I have a command plugin that needs to draw to the editor when the user toggles a button. I am using a SceneHookData plugin to accomplish the actual drawing. So, I want to send a message to the SceneHook to tell it what state the toggle button is in to activate the drawing in the Draw function.

      I can successfully pass the message from my Command Plugin to main.cpp, but my question is how to get this information into my SceneHookData plugin. How can I receive that message inside the SceneHookData?

      Thanks!

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

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

        On 30/12/2009 at 02:21, xxxxxxxx wrote:

        With BaseDocument::FindSceneHook(PluginID) you can get your scene hook and change for instance a value in its BaseContainer according to toggle button. In the scene hooks draw function read out the container value. You can trigger a redraw from within the CommandData with DrawViews().

        cheers,
        Matthias

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

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

          On 30/12/2009 at 09:13, xxxxxxxx wrote:

          I would rather use a message data plugin and use SpecialEventAdd to send out a message to all plugins and accordingly catch the message and react (fcourse you should also be able to catch the message in a SHP). Just an idea.

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

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

            On 30/12/2009 at 19:10, xxxxxxxx wrote:

            Great. Thanks for the suggestions!

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

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

              On 06/07/2010 at 01:15, xxxxxxxx wrote:

              "With BaseDocument::FindSceneHook(PluginID) you can get your scene hook and change for instance a value in its BaseContainer"

              could someone give a bit more info on this? maybe how it looks in code.

              thanks alot

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

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

                On 07/07/2010 at 03:27, xxxxxxxx wrote:

                Here is a little example how to change a container value for a scene hook from within a CommandData plugin for example.

                  
                PluginSceneHook *sh = doc->FindSceneHook(ID_MYSCENEHOOK);  
                if (sh)  
                {  
                  BaseContainer *data = sh->GetDataInstance();  
                  data->SetLong(MYSCENEHOOK_VALUE, 100);  
                  
                  EventAdd();  
                }  
                

                cheers,
                Matthias

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

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

                  On 08/07/2010 at 16:54, xxxxxxxx wrote:

                  Thanks!

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