-
How do I get the current frame being rendered in a Python tag?
Using doc.GetTime().GetFrame(doc.GetFps()) works fine in the editor, but i can’t find an alternative to use while rendering?
import c4ddef main():
doc = c4d.documents.GetActiveDocument()currentFrame = doc.GetTime().GetFrame(doc.GetFps())
print currentFramechildren = op.GetObject().GetChildren()
childIndex = 0for 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