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

    How to run a videoPost plug-in when user changes the scene?

    Cinema 4D SDK
    2
    2
    317
    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.
    • M
      maxiokid
      last edited by

      Hello,

      I'm upgrading a videoPostData plug-in to the newest SDK version.

      With R22, my plug-in Execute method was called each time the user changed the scene (move a mesh, play timeline, ...).

      With 2023.2.2 and with the same code the Execute is only called after a render.

      RENDERRESULT MyPlugin::Execute(BaseVideoPost* node, VideoPostStruct* vps)
      {
          ApplicationOutput("I want to be called at each editor-window change");
          if( vps->vp == VIDEOPOSTCALL::RENDER && !vps->open && *vps->error == RENDERRESULT::OK )
          {
              VPBuffer *rgba = vps->render->GetBuffer(VPBUFFER_RGBA, NOTOK);
              // ...
          }
          return RENDERRESULT::OK;
      }
      

      How can I restore this behavior with the new SDK?

      As reference, the behaviour I'm looking for is the same as the current "Sketch and Toon" effect when you enable "ViewportDisplay/Show Lines" in the effect settings.

      macos 13.4.1
      C4D 2023.2.2
      C++ SDK

      Thanks for your help

      1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov
        last edited by

        Hi @maxiokid ,

        Please excuse the long answer delay.

        There're a lot of changes between R22 and 2023.2.2, so I'm not surprised the behavior has changed. The way you adapt your plugin to the new SDK depends on what you're trying to achieve. Please provide a more detailed description of the the effects you need to use inside the execute function. Usually a minimally functional code snippet that highlights the issue is a very self-explanatory way to do that.

        Cheers,
        Ilia

        MAXON SDK Specialist
        developers.maxon.net

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