Messages from CustomGUI to the NodeData



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

    On 10/07/2012 at 05:08, xxxxxxxx wrote:

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

    ---------
    Could some one please help me with this?

    How to send Messages from CustomGUI to the NodeData ?
    What I want to do is sending something like MSG_DESCRIPTION_COMMAND from the Button GUI.
    And then it would be great if there would be way to send message back from NodeData to CustomGUI that belong to this Object.

    thanks,
    Remo



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

    On 06/08/2012 at 08:08, xxxxxxxx wrote:

    Hi,

    Could you please explain more what you try to achieve?



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

    On 07/08/2012 at 11:50, xxxxxxxx wrote:

    Hi,

    Well  I have CodeEditorGUI, you can find it here:
    http://code.google.com/p/code-editor-gui/

    Now I want to send Message from this GUI to the ObjectPlugin.
    This is something like Button GUI do if you press on it, it will send MSG_DESCRIPTION_COMMAND with DescriptionCommand data.

      
    The button element creates a clickable button in the description list. It does not directly correspond to an item in the container.  
     **Note:** Listen for [ MSG_DESCRIPTION_COMMAND](../c4d_baselist/enum_MSG_Atom1026.html#msg_description_command11) in [NodeData](../c4d_nodedata/class_NodeData1066.html)::[Message()](../c4d_nodedata/class_NodeData1066.html#message6). (See _MorphMixer.cpp_.)  
    
      
    Bool ObjectData::Message([GeListNode](../c4d_baselist/class_GeListNode585.html)* node, LONG type, void* data)  
    {  
      if(type==MSG_DESCRIPTION_COMMAND){  
          DescriptionCommand *dc = static_cast<DescriptionCommand*>(data);  
          ///do something  
      }  
      return TRUE;  
    }  
    

    So the question is how to send this message from iCustomGui to the Object (or Tag) that uses this GUI ?

    thanks,
    Remo



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

    On 07/08/2012 at 12:21, xxxxxxxx wrote:

    If you have the NodeData for some object then can you just do:

      
    DescriptionCommand d;   
    // set the member values in 'd' then where 'nd' is your NodeData*:   
    nd->Message(nd->Get(), MSG_DESCRIPTION_COMMAND, &d;);   
    

    Would that work? I tried it here and it seemed to work okay.



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

    On 07/08/2012 at 13:34, xxxxxxxx wrote:

    Wouldn't BaseList2D::Message() be enough? Or is there a special reason for using the NodeData directly? Also, wouldn't it imply this?

    To send the message:

    op->Message(MSG_MY_CUSTOM_MESSAGE, (void* ) mydata);
    

    To react on the message:

    if (type == MSG_MY_CUSTOM_MESSAGE) {  
      MyData* mydata = (MyData* ) data;  
      // ...  
    }
    

    Cheers,
    -Niklas



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

    On 08/08/2012 at 02:38, xxxxxxxx wrote:

    If you have the NodeData for some object then can you just do...

    Think this is the problem. 
    How to get pointer to Object or Tag or whatever to with the GUI belong ?

    If you have pointer then this is not the problem any more.

    It would be also interesting to send Message from Object (NodeData) to all its GUI.


Log in to reply