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

    Calling system command on animation frame change

    Cinema 4D SDK
    c++ python
    2
    6
    888
    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.
    • yesbirdY
      yesbird
      last edited by

      Hello.
      I'm writing an exporting tool for POV-Ray now and thinking about external rendering of animation frames, assuming following scenario:

      for every_frame:
        save_scene();
        call_renderer(); // As external system command
      

      I'm very new to the C4D SDK, so could you please suggest to me, how to find the event of frame change and run commands on this event ?

      Unfortunately, searching manuals still does not give any results.

      Thanks in advance,
      Sergey (Yesbird).

      --
      YB

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by Manuel

        hi,

        Is this question still in the context of CineWare or are you using the "regular" SDK ?
        As you saw, sometimes, not all functions are available in the Cineware SDK.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        yesbirdY 1 Reply Last reply Reply Quote 0
        • yesbirdY
          yesbird @Manuel
          last edited by yesbird

          Hi, @manuel.

          I mean regular SDK here.
          ....
          YB

          --
          YB

          yesbirdY 1 Reply Last reply Reply Quote 0
          • yesbirdY
            yesbird @yesbird
            last edited by

            Hi, @manuel.

            I only want to add, that Cineware-based solution even more preferable, as it much more easy to debug.

            Btw, is there a way to detach C++ written plugin dll for rebuild time not restarting C4D application ?
            ....
            YB

            --
            YB

            1 Reply Last reply Reply Quote 0
            • ManuelM
              Manuel
              last edited by Manuel

              Hi,

              Cinema 4D SDK and Cineware are two distinct products with different goals. Cineware allow you to import in your application maxon technologies. This can allow your application to read c4d file or use our render engine to render your scene.

              Cinema 4D sdk allow to extend Cinema 4D possibilities like creating a renderer integrated inside Cinema 4D.

              I would rather use the Cinema 4D SDK where you can create a VideoPostData. This is how Render Engine are implemented. This pluging type will give you access to the function Execute. This function is called at different points during the render process. You can have a look at this thread where i used the function CreateRay to create my own lens effect.

              Inside this Execute function you should not have any issue about the scene update. (The scene is duplicated when it is rendered). If so, you can always "force" c4d to ExecutePasses to be sure that all objects have an updated cache. (In some cases, you must call ExecutePasses twice in a row). The system will send each frame one after the other you do not have to change the time manually.

              If you want to change the document time, you can use SetTime but as said in the note, you must use ExecutePasses.

              Cineware is rough. If you want to read animation, you must access the animation track for every parameter and retrieve the cache of each generator.

              Cheers,
              Manuel

              MAXON SDK Specialist

              MAXON Registered Developer

              1 Reply Last reply Reply Quote 0
              • yesbirdY
                yesbird
                last edited by

                Hi, Manuel.

                Thank you for description of both approaches, now I can compare them and choose the best.

                Regards,
                Sergey (Yesbird).

                --
                YB

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