Keyframe on text body in Python?

by Tinstar   Last Updated October 20, 2019 01:15 AM - source

I'm trying to animate a paragraph of text where each word is a separate frame. Looping through the full text can come later, right now I'm just trying to figure out switching the text from one frame to another. I don't want or need to animate typing and deleting text, I just want every frame to have a different text body. Here's what I have:

import bpy

text =['Text'] = 'Here is my text'
text.keyframe_insert(data_path="data.body", frame=1) = 'Now it should change'
text.keyframe_insert(data_path="data.body", frame=2)

The error I get on the first keyframe_insert line is ValueError: bpy_struct.keyframe_insert() path spans ID blocks. Is it even possible to keyframe the body? I don't actually know what data_path I should be aiming for, data.body was just a guess. I haven't found a ton of resources on animating object properties, or even what object properties are legal to animate, so any answers or resources in that direction would be much appreciated.

Related Questions

Animating a mesh deformation using python

Updated May 26, 2016 08:06 AM

Auto add keyframe at regular intervals?

Updated August 04, 2018 21:15 PM

Activate keying set [Python]

Updated December 25, 2018 22:15 PM