Update for rendering



  • 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



  • 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



  • 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


Log in to reply