Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    CoreMessage and msg data

    SDK Help
    0
    6
    588
    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 01/03/2007 at 13:20, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hi again,

      I'm trying to determine when a render to picture view start/end.

      I'm trying to receive MSG_MULTI_RENDERNOTIFICATION in a dialog
      plugin through CoreMessage(), but not receiving.

        
      Bool PluginDialog::CoreMessage(LONG id,const BaseContainer &msg;){  
           switch (id){  
                case MSG_MULTI_RENDERNOTIFICATION:  
                     GePrint("received MSG_MULTI_RENDERNOTIFICATION");  
                break;  
           }  
           return GeDialog::CoreMessage(id,msg);  
      }  
      

      also how do I tell if render starts or ends?

      thanks for all the help guys 🙂

      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 01/03/2007 at 15:38, xxxxxxxx wrote:

        Don't use CoreMessage() (wrong method). If you look at CoreMessage(), it doesn't receive these type of messages at all. Use Message() instead. Problem is that GeDialog::Message() doesn't receive this type of message either - it only receives GUI messages. This message is usually relayed to other plugin types (Object, Tag, etc.) - anything based on NodeData.

        The solution is to use another type of plugin, usually a SceneHook is suggested.

        Per your second question:

        case MSG_MULTI_RENDERNOTIFICATION:  
        {  
             if (!data)                                   return TRUE;  
             RenderNotificationData*     rnd =          (RenderNotificationData* )data;  
             if (!rnd)                                   return TRUE;  
             // Start Editor or External Render (set Render visibility)  
             if (rnd->start || (rnd->external && (rnd->doc != GetActiveDocument())))     ...  
             // End Editor or External Render (restore Editor visibility)  
             else ...  
             break;  
        }
        

        Check out RenderNotificationData in the SDK Docs.

        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 02/03/2007 at 10:13, xxxxxxxx wrote:

          I've tried to create the scene hook, but crash after register.
          am I missing somenthing?

            
            
          class MySceneHook : public NodeData {  
          public:  
               Bool Message(GeListNode* node, LONG type, void* data) {  
                    GePrint("scene hook message");  
               };  
          };  
            
          static NodeData* SceceHookAllocator() {  
               NodeData *data = gNew MySceneHook;  
               return data;  
          }  
            
          Bool PluginStart(void) {  
            
          // scene hook  
          Bool r= RegisterSceneHookPlugin(     1007778,  
                                             "my plugin",  
                                             PLUGINFLAG_HIDE | PLUGINFLAG_HIDEPLUGINMENU,  
                                             SceceHookAllocator,  
                                             EXECUTION_INITIAL,  
                                             0,  
                                             NULL );  
          }  
            
          
          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 02/03/2007 at 12:24, xxxxxxxx wrote:

            1. class MySceneHook : public SceneHookData

            2. Do your allocator like this:

            class MySceneHook : public SceneHookData
            {
                 Bool Message(GeListNode* node, LONG type, void* data) {
                      GePrint("scene hook message");
                 };
                 static NodeData* Alloc() { return gNew MySceneHook; }
            };

            Bool PluginStart(void) {
                 Bool r = RegisterSceneHookPlugin(     ...
                      MySceneHook::Alloc(),
                      ...
                      );
            }

            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 02/03/2007 at 12:39, xxxxxxxx wrote:

              Thanks all working now!
              I was using the wrong base class 😞

              small correction

                
              Bool PluginStart(void) {  
                   Bool r = RegisterSceneHookPlugin(     ...  
                   MySceneHook::Alloc,  
                        ...  
                        );  
              }  
              
              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 02/03/2007 at 16:46, xxxxxxxx wrote:

                You are correct. 😉

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