Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Maxon Cinema 4D How do I get the current frame being rendered in a Python tag?

  • How do I get the current frame being rendered in a Python tag?

     Ivan de Wolf updated 4 weeks, 1 day ago 2 Members · 2 Posts
  • Max Tomren

    October 18, 2018 at 5:15 pm

    Using doc.GetTime().GetFrame(doc.GetFps()) works fine in the editor, but i can’t find an alternative to use while rendering?


    import c4d

    def main():
    doc = c4d.documents.GetActiveDocument()

    currentFrame = doc.GetTime().GetFrame(doc.GetFps())
    print currentFrame

    children = op.GetObject().GetChildren()
    childIndex = 0

    for child in children:

    child.SetEditorMode(c4d.MODE_OFF)
    child.SetRenderMode(c4d.MODE_OFF)

    if child.GetBit(c4d.BIT_ACTIVE):
    child.SetEditorMode(c4d.MODE_ON)
    child.SetRenderMode(c4d.MODE_ON)

    if childIndex == currentFrame:
    child.SetEditorMode(c4d.MODE_ON)
    child.SetRenderMode(c4d.MODE_ON)

    childIndex += 1

  • Ivan de Wolf

    May 27, 2022 at 9:19 pm

    Hi Max!

    Any luck on this? I am needing this solution too! 🙂

    Cheers,

    Ivan

Viewing 1 - 2 of 2 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy