MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

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

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Max Tomren
How do I get the current frame being rendered in a Python tag?
on Oct 18, 2018 at 5:15:32 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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]