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

    Start IPR rendering in the viewport

    Cinema 4D SDK
    windows c++ 2025
    2
    5
    511
    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.
    • F
      freeze
      last edited by

      I register a VideoPostPlugin as a renderer.Now I can render an image to viewport or picture viewer in c4d with my own renderer plugin.
      How can I get the message that the scene changed so I can update the render view with new scene data and display in the viewport of c4d ,just like Redshift Start IPR ,using c++.
      Many Thanks!

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @freeze
        last edited by ferdinand

        Hello @freeze,

        thank you for reaching out to us. Scene changes are communicated as the core message EVMSG_CHANGE, such messages can be received in the CoreMessage methods of a GeDialog (and derived types) or MessageData instance.

        There is however no data which would inform you what has changed. You are expected to track that yourself. See How to detect a new light and pram change? for one of the cases where we discussed tracking scene changes. The case is for Python which is more or less analogous to C++. They main difference in C++ is that you can use GeMarker directly and do not have to go over MAXON_CREATOR_ID (which is just the data of the GeMarker of the node).

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        F 1 Reply Last reply Reply Quote 0
        • F
          freeze @ferdinand
          last edited by

          Hello @ferdinand ,
          I have created a Message method as:

          Bool SmarayPlugin::Message(GeListNode* node, Int32 type, void* data) 
          {
          
              BaseList2D* const item = static_cast<BaseList2D*>(node);
              if (!item)
                  return false;
          
              BaseContainer* renderdata = item->GetDataInstance();
          
              switch (type)
              {
              case MSG_DESCRIPTION_COMMAND:
              {
                  DescriptionCommand* dc = static_cast< DescriptionCommand*>(data);
                  if (dc->_descId[0].id == AOV_MANAGER_BUTTON)
                  {
                      if (aov_dialog) {
                          aov_dialog->Close();
                          DeleteObj(aov_dialog);
                      }
          
                      aov_dialog = NewObjClear(UISmarayAOVManager, renderdata);
                      if (aov_dialog) {
                          aov_dialog->Open(DLG_TYPE::ASYNC, 800, 800, 800, 600);
                      }
                  }
                  break;
              }
              default:
                  break;
              }
          
              return VideoPostData::Message(node, type, data);
          }
          

          I use it to get the button clicked event to create dialog for setting the AOVs and I find that it may get different type of Message .So can I just check if it is EVMSG_CHANGE and go through my own logic here?

          ferdinandF 1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand @freeze
            last edited by ferdinand

            Hey @freeze,

            no, that would not be correct. This is a NodeData::Message method you are showing us here which hooks into the message stream sent to a node, not the core message stream. As already explained above, you will need the CoreMessage method of a GeDialog (or derived types) or MessageData instance to receive core messages. I also posted a link to (Python) example code above.

            There is no dedicated manual for the message system in C++, but we have a small one for the Python API.

            Cheers,
            Ferdinand

            MAXON SDK Specialist
            developers.maxon.net

            F 1 Reply Last reply Reply Quote 0
            • F
              freeze @ferdinand
              last edited by

              @ferdinand Thank you for answering ,I 'll try it.

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