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

    Force 'Pause'/Wait when switching between Takes at Batch Render

    Cinema 4D SDK
    6
    9
    1.3k
    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.
    • constantine_sazonovC
      constantine_sazonov
      last edited by

      Hey everyone,

      So happy this forum exists, such a great vault of information!

      The question is the following:

      • The scene has a number of Takes
      • When the Take switches, some Python code does some changes in the scene
      • It takes a few seconds for a python code to finish it's work with the scene.

      If I manually switch between Takes, everything is great. But if I send all takes to batch render, it renders unfinished state of the scene. For example if some objects should appear, on batch render they will not be there, because python calculation didn't finished, while next Take already started rendering.

      Is there a way or some trick, to make Cinema 4D make a forced pause everytime it switches to the next Take at batch rendering?

      Many thanks!
      Have a great day everyone.

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

        Hi,

        it's hard to understand what your code is doing. Could you share something with us?
        If you can't share in the forum, you can use our mailbox [email protected]

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • fwilleke80F
          fwilleke80
          last edited by

          What's the Python code? An expression tag, or a Python generator? Or some plugin, or a script that gets called?

          Expression tags and generators are not allowed to change the scene, and they also return a distinct result when they're done. Therefore, I wonder what kind of code you are running, and in which context. How come Cinema ist not aware of your code changing the scene? I would rather try to clarify this and probably change the implementation, instead of putting in waits and pauses, which would interefere even moer with Cinema's pipeline.

          Cheers,
          Frank

          www.frankwilleke.de
          Only asking personal code questions here.

          1 Reply Last reply Reply Quote 0
          • constantine_sazonovC
            constantine_sazonov
            last edited by constantine_sazonov

            Hey there @fwilleke80 and @m_magalhaes
            Thanks so much for your responses!

            The 'code' is an expression tag. Expression tag reacts to a User Data switches on some Null object. Switches make different sets of Instance objects become visible or invisible.

            At the end of the project I create Takes, each take has recorded a click on UserData Button. This click makes expression tag code to show/hide different instance objects. The geometry is heavyweight, so it takes a couple of seconds for C4D to make these instances visible.

            If I export each take to a separate scene or if I select takes manually - each render shows corresponding set of instances. But on batch render every take shows the same geometry from the first take, as it has not enough time to switch instances, before the render begins.

            I am not sure if it's possible to discuss this problem without showing the actual code (it's around 2000 lines).

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

              Hi,

              @constantine_sazonov said in Force 'Pause'/Wait when switching between Takes at Batch Render:

              each take has recorded a click on UserData Button

              Sorry this part isn't clear, i might be wrong but button click can't "recorded" inside takes.

              I will try to reproduce the issue and let you know. But maybe if you could reproduce the issue with a simplified scene/code that could help.

              Cheers,
              Manuel

              MAXON SDK Specialist

              MAXON Registered Developer

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

                Hi,

                I couldn't reproduce the issue; did you make some progress since then?

                Cheers,
                Manuel

                MAXON SDK Specialist

                MAXON Registered Developer

                1 Reply Last reply Reply Quote 0
                • ferdinandF
                  ferdinand
                  last edited by

                  Hello @constantine_sazonov,

                  without any further replies or questions, we will consider this thread as solved by Thursday and flag it accordingly.

                  Thank you for your understanding,
                  Ferdinand

                  MAXON SDK Specialist
                  developers.maxon.net

                  1 Reply Last reply Reply Quote 0
                  • T
                    tim97
                    last edited by

                    Also looking for solution to this!

                    1 Reply Last reply Reply Quote 0
                    • M
                      m_adam
                      last edited by

                      H @tim97 , if you read the previous answers from Manuel, we were not able to reproduce the behavior, since you are looking for the solution I guess you have the same issue.
                      Would it be possible for you to share a scene and a script?

                      Thanks in advance,
                      Cheers,
                      Maxime.

                      MAXON SDK Specialist

                      Development Blog, MAXON Registered Developer

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