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

    Render callbacks

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 597 Views
    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 Offline
      Helper
      last edited by

      On 09/06/2017 at 04:58, xxxxxxxx wrote:

      Hi all,
      We are trying to port our yVR tool to Cinema4D (http://www.ycdivfx.com/product/yvr/). But there seems to be a lack of render callbacks, to attach and grab what is rendering, at least in Python.
      The only way I saw that we could do this, is using a VideoPostData plugin (C++) and grab what is rendering there, but again I can't seem to grab the full image in the middle of the render only lines or pixels.
      I would avoid C++, mostly to avoid recompiling for different versions, but if that is only option, we don't have a problem with it.

      Best regards,

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

        On 09/06/2017 at 07:23, xxxxxxxx wrote:

        Hi Daniel,

        welcome to the Plugin Café forums 🙂

        As far as your actual question is concerned, we'll check out the options and will get back to you next week.

        C++ vs. Python:
        Actually our C++ API/ABI is pretty stable, so unless you don't use any new features, you could compile for an older version (e.g. R16) and the plugin will most likely run fine in R17 and R18. So recompiling need not necessarily be an issue.

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

          On 09/06/2017 at 11:09, xxxxxxxx wrote:

          Thanks, Andreas.
          I would prefer to use Python if possible, since we will try to support both Windows and Mac users, and is much easier with a non-compiled language (no xcode hell 🙂 ).

          Have a great weekend.

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

            On 13/06/2017 at 02:25, xxxxxxxx wrote:

            Hi Daniel,

            the options in Python are indeed a bit limited, as you neither have VideoPost nor the ProgressHook of RenderDocument() available (see C++ docs in comparison). In C++ you could do like described in this thread: Physical render - Progressive

            In Python you can do the following:
            Set up a thread that will eventually call RenderDocument(). Somewhere in main thread, e.g. in a MessageData timer, read the bitmap that's being rendered into asynchronously.

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

              On 13/06/2017 at 08:00, xxxxxxxx wrote:

              Thanks Andreas,
              I will try the Python approach first (it's similiar to what we do in Houdini), and if that fails, I will go for the C++ one. I will keep you post, and when I have a working implementation of yVR, I will post it here.

              Cheers,

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