Keyframe on text body in Python?

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

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 = bpy.data.objects['Text']
text.data.body = 'Here is my text'
text.keyframe_insert(data_path="data.body", frame=1)

text.data.body = '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


Updated April 05, 2015 16:06 PM

Updated May 26, 2016 08:06 AM

Updated August 04, 2018 21:15 PM

Updated December 25, 2018 22:15 PM

Updated March 08, 2018 07:15 AM