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

    vps->doc is changed on every Execute [SOLVED]

    SDK Help
    0
    2
    258
    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

      On 23/12/2016 at 07:12, xxxxxxxx wrote:

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

      ---------
      Hello.

      When I try to render a scene in IRR (with my render engine), I use the document inside VideoPostStruct variable of Execute call. 
      The problem is that the pointer of that document is changed in every Execute call. 
      That means I cannot detect the object changes from one document to another since the object pointers change as well.

      On the other hand, rendering in Picture Viewer N frames (IRR is disabled), I get the same pointer for 
      vps->doc and it's easy for me to detect object changes from one document to another.

      Is there anything I can do to be able to detect document changes in IRR between Execute calls, so I can pass the updated data in my render engine ?

      Thank you very much for your time.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 27/12/2016 at 08:51, xxxxxxxx wrote:

        Hi Peterakos, thanks for writing us.

        With reference to your question, the IRR uses a temporary copy of the currently active scene which, and as you reported it's unlikely to remain the same across multiple calls of the VideoPostData::Execute() method.
        That said there's no single way to detect changes occurring between Execute calls and relying on the IRR automatism might result more complex than implementing a custom scene change queue and feed the renderer only with those changes occurred. In this case since you're not provided with a VolumeData representation you must access the caches of generators and deformers manually.

        Best, Riccardo

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