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
    • Recent
    • Tags
    • Users
    • Login

    Update for rendering

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 255 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 16/09/2014 at 13:05, xxxxxxxx wrote:

      Hi there,

      I scripted something like a deformer plugin and in the viewport I get the right results, but if it comes to render the stuff out, nothing happens.

      Do I have to update the deforming cache for rendering in a certain way or what did I miss?
      I actually tried:

      c4d.EventAdd(c4d.EVENT_FORCEREDRAW)

      flags = c4d.DRAWFLAGS_NO_THREAD | c4d.DRAWFLAGS_FORCEFULLREDRAW
      c4d.DrawViews(flags)

      Thanks in advance
      Martin

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

        On 17/09/2014 at 16:47, xxxxxxxx wrote:

        after a little bit debugging and printing out some variables in the execute function,
        I figured out, that my plugin is running twice while rendering.
        The first time with a still frame and the second time with all the animations going on.
        (If I synchronously start the timeline while rendering it executes only once)

        In the docs I found an article about writing delta time plugins and
        the well defined initiale state.
        http://plugincafe.com/python/misc/writingdelta.html
        ""The first frame of the scene must have a well-defined state. This is important, since C4D always pre-rolls the renderer from the first frame. The easiest way to do this is to just check in the TagData.Execute() function if the current frame is the first one, and then reset all objects to their starting positions if it is.""
        There is no example and I can´t imagine how to implement this.
        Any Help?
        Thanks in advance
        Martin

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

          On 24/09/2014 at 07:47, xxxxxxxx wrote:

          just in case....

          c4d.documents.GetActiveDocument() is not the rendered document.
          You should use op.GetDocument() instead.

          It´s logical but if you are not that experienced....

          Credits go to César Vonc who helped me with this.
          I recommend visiting his website warmly.
          Great stuff to learn from!

          cheers
          Martin

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