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

    Flush a group in a non-main thread.

    Cinema 4D SDK
    r20 c++
    2
    6
    1.6k
    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.
    • P
      peterakos
      last edited by

      Hello.

      I have a group which I want to flush and re-add the components in it.
      I have to do that in a VideoPostData's ::Execute(....) method but since this runs in a non-main threaded, the dialog doesn't change.
      How can I do that ?

      Thank you for your time.

      1 Reply Last reply Reply Quote 0
      • a_blockA
        a_block
        last edited by a_block

        Hi,

        we have the general question, what is the use case of updating a dialog from within the rendering pipeline? This seems pretty unusual to us.

        In general you can use Core Messages to execute code in the main thread, see Core Messages Manual. This still works in R20.

        In R20 there's ExecuteOnMainThread() in the maxon::JobInterface, see Jobs Manual. But I strongly suggest, that we first discuss, why you want to update a dialog from within the rendering pipeline. Otherwise you'd probably run into unexpected results with this approach.

        I turned your thread into a question, see Q&A New Functionality.

        Bye,
        Andreas

        P 1 Reply Last reply Reply Quote 2
        • P
          peterakos @a_block
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • P
            peterakos
            last edited by

            Hello.

            Once I finish the rendering of an image, I need to retrieve some data from my render engine. These data are produced in a mid-rendering or in a post-rendering state. The ideal position to request the data from my render engine is in Videopost's Execute method, where I update the Picture Viewer image.

            Thank you for your support !

            1 Reply Last reply Reply Quote 0
            • a_blockA
              a_block
              last edited by

              Hi,

              you really shouldn't rely on updating a dialog from the render pipeline. You simply do not know, in which context the rendering is happening. For example it could be in command line renderer, which doesn't have a GUI at all.

              Instead it would be better to take the result from rendering after it has finished and then update the dialog.

              Cheers,
              Andreas

              1 Reply Last reply Reply Quote 2
              • P
                peterakos
                last edited by

                Hello.

                I have solved it by using SpecialEventAdd and sending a message to dialog's CoreMessage.

                Thank you.

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