Receiving Plugin Messages

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!

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

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.

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!

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

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

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!