SOLVED Access Bake Objects (Timeline) or Bake Animation to Curves


I'm trying bake my animation into curves, currently, they are either driven by procedural animation (e.g. vibrate tag) or by a PSR tag.

However, I don't see any details about the baking option in the documentation. It's either BakeTexture or BakeWeights. Same goes with the topics here in the forum.

There is a thread about baking curves here. I appreciate the recreation of the code for the baking procedure, but I just need to just access the bake texture dialog box, so I can save myself from debugging.

You can see what I am trying to access here:

Is there a way around this?

Thank you for looking at my problem.

Hi @bentraje,

The thread about baking curves is still the right way to go if you want to be exact and want to bake other properties than PSR.

However, if you're just interested in baking only your PSR, you can use doc.Record(), this works on all selected Objects since R19. You can take a look at the following example for baking Cubes with a Vibrate-Tag for example...:

import c4d

def SetCurrentTime(currentTime, doc):
    doc.ExecutePasses(None, True, True, False, 0)    

def main():
    minTime = doc[c4d.DOCUMENT_MINTIME]
    maxTime = doc[c4d.DOCUMENT_MAXTIME]
    fps = doc.GetFps()
    if minTime != maxTime:
        currentTime = minTime
        while (currentTime <= maxTime): 
            SetCurrentTime(currentTime, doc)
            print "Baking: Frame: %s" %(currentTime.GetFrame(fps))
            #New since version R19.
            #Records the active objects in the document.
            currentTime += c4d.BaseTime(1, fps)

if __name__=='__main__':

Oh, and accessing the "Bake Objects..." Dialog via Python is not possible!

Hi @bentraje,

Actually, this is not possible as @lasselauch demonstrate you, the only way is to do it manually.



I guess I need to revisit the script in the link above when I need to bake user data. Anyway, your script will do at the moment. It's readable enough for my newbie eyes 🙂 It works as I expected!

Thanks for the handy script.


Thanks for the confirmation!