How to get the current Frame

  • On 31/03/2014 at 20:08, xxxxxxxx wrote:

    Does anyone know how to get the current frame in python?  I was hoping I could just push play and get the current frame as it plays through the timeline.

  • On 01/04/2014 at 01:46, xxxxxxxx wrote:

    Take a look at the BaseDocument class in the Python documentation. The page contains an example which runs through the scene and displays the time. Is this what you are looking for?

    Cheers, s_rath

  • On 01/04/2014 at 08:42, xxxxxxxx wrote:

    Wow....If it had teeth it would've bit me.  Thank you s_rath!

  • On 01/04/2014 at 14:09, xxxxxxxx wrote:

    I do have one more question.  How do I get the current frame that the green marker is on? I don't want to traverse the timeline but find out what frame the current marker is on.

  • On 01/04/2014 at 14:15, xxxxxxxx wrote:

    Nevermind I found it.

    ctime = doc.GetTime() # Save current time
    print 'CTIME ' + str(ctime.GetFrame(fps))

    Thanks bru

Log in to reply