I want to give an explanation in text during an animation I made in blender. However, with my current script, I only see the second text displayed during the whole animation. How do I change my code such that for frame 40-60 the first text is shown, and for frame 75-83 the second text?
Thanks in advance!
import bpy
scene = bpy.context.scene
obj = scene.objects['Text']
def recalculate_text(scene):
frame = scene.frame_current
for frame in range(40, 60):
obj.data.body = 'First Text'
for frame in range(75, 83):
obj.data.body = 'Second Text'
bpy.app.handlers.frame_change_pre.append(recalculate_text)