I know its possible to bake the values of drivers to keyframes using Object > Animation > Bake Action but is there a way to bake a driver that is controlling a Camera's properties? I want to delete these drivers while keeping the same Camera animation.

Edit: Link to Blend

link to comparison video


1 Answer 1


Quick script to bake camera data.

Bake a bpy.types.Camera object's drivers to keyframes.

  • Bakes all driven properties of scene.camera.data from scene.frame_start to scene.frame_end in frame_step steps.
  • Assumes there are no array type properties on camera
  • Leaves drivers intact, will need to be removed. (Currently code used to remove camera drivers crashes my version of 2.8, and doesn't work on 2.79) Keyframes trump drivers. Remove manually if happy with result.

Test script

import bpy
context = bpy.context
scene = context.scene
cam_ob = scene.camera
cam = cam_ob.data
frame_step = 1
ad = cam.animation_data

f = scene.frame_start
if ad:
    while f <= scene.frame_end:
        for d in cam.animation_data.drivers:
        f += frame_step
  • $\begingroup$ The script itself looks to have worked, and quite fast as well. Im rendering the result and will mark as accepted answer if it works. $\endgroup$
    – Haybale100
    Commented Feb 14, 2019 at 1:21
  • $\begingroup$ As previously said, the script itself looks to have worked for the project in Blender's viewport, but upon rendering (through the distributed render farm, Sheepit), the result is not correct (seems that the focal length is not adjusting as expected). I have updated my question with a link to a simplified version of the blend file and the rendered result clip to compare if you or anyone want to test locally. $\endgroup$
    – Haybale100
    Commented Feb 14, 2019 at 3:44
  • $\begingroup$ As a rule to self, I don't download 90Mb files to answer BSE questions. Can you add a stripped down file with the driver set up (no vid) to blend-exchange.giantcowfilms.com ? (paste link in question) $\endgroup$
    – batFINGER
    Commented Feb 14, 2019 at 8:03
  • $\begingroup$ That is fair, I did not know that blend-exchange.giantcowfilms.com existed. I've updated the link on the question $\endgroup$
    – Haybale100
    Commented Feb 14, 2019 at 12:13
  • 1
    $\begingroup$ In case someone needs it: you can add d.mute = True to disable but not delete a driver. $\endgroup$
    – Wouter
    Commented Mar 6, 2020 at 23:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .