Currently I have a default cube and 400 frames.
Here's what I have working without keyframing
import bpy
current_scene = bpy.context.scene
default_cube = current_scene.objects['default_cube']
def update_scene():
current_frame_value = current_scene.frame_current
if current_frame_value < 100:
default_cube.scale.x = .05
elif current_frame_value < 200:
default_cube.scale.x = .08
elif current_frame_value > 300:
default_cube.scale.x = .3
else:
default_cube.scale = 1
bpy.app.handlers.frame_change_pre.append(update_scene)
print('I work!')
The problem I'm having with the non-keyframe method is there isn't any interpolation between the scaling and I intend do this for thousands of frames. What is a good method to use keyframes programmatically to achieve interpolation?
https://docs.blender.org/manual/en/latest/editors/python_console.html Blender 2.8 doesn't reference anywhere.