Jump to content

Running through a Frame Range

Recommended Posts



I am working on a script that will pull information from individual frames in an animation. I am having a problem and narrowed it down to the FOR loop that is used to run through the frames of the animation. Can anyone help to identify why the following code will only set the current frame to the last value in the FOR loop? The goal is to run the script and get the "Frame" and "Value F" to display the same number.


import c4d
from c4d import gui

def main():
    fps = doc.GetFps() #get fps number
    obj = doc.SearchObject("Cube")
    for f in range(0, 96, 24):
        doc.SetTime(c4d.BaseTime(f, fps))
        print "Object =", obj
        print "Frame = ", bt.GetFrame(fps)
        print "Value F = ", f

if __name__=='__main__':

Any help is greatly appreciated!


Thank you,


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...