change a textobject during animation

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Posts: 6
Joined: Tue Feb 28, 2012 6:13 pm

change a textobject during animation

Postby _patrice_ » Mon Jul 09, 2012 10:15 pm

Hi experts,

I try since hours to change a text object during animation in blender 2.63. I want to realize an image count in an animation film. It is clear how to change the text in a text object:

Code: Select all["Text"].data.body = "frame "+str(i)

My setup is an Inputnode (Movie Clip) and a Render Layer with the text object. I also know how to render the animation using python:

Code: Select all

bpy.ops.render.render( animation=True, write_still=True )

But I have no idea how to implement a kind of a loop changing the text object for each frame of the animation.
Can anyone give me some tips? This would be very nice and help me a lot.


Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Tue Jul 10, 2012 8:50 pm

how about using a handler? ... dlers.html

if you add the text changing code to frame_change_pre, it will be executed right after frame change but before rendering.
I'm sitting, waiting, wishing, building Blender in superstition...

Posts: 6
Joined: Tue Feb 28, 2012 6:13 pm

Postby _patrice_ » Wed Jul 11, 2012 8:21 pm


Thank you very much.

It's so easy but one have to know it! You opened me a lot of new perspectives... :D

Return to “Python”

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests