Previous Thread  Next Thread

chat icon change a textobject during animation

_patrice_

Posted: Mon Jul 09, 2012 9:15 pm
Joined: 28 Feb 2012
Posts: 5
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:

bpy.data.objects["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:

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.

regards,
_patrice_
Reply with quote


CoDEmanX

Posted: Tue Jul 10, 2012 7:50 pm
Joined: 05 Apr 2009
Posts: 684
how about using a handler?

http://www.blender.org/documentation/blender_python_api_2_63_13/bpy.app.handlers.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...
Reply with quote


_patrice_

Posted: Wed Jul 11, 2012 7:21 pm
Joined: 28 Feb 2012
Posts: 5
@CoDEmanX:

Thank you very much.

It's so easy but one have to know it! You opened me a lot of new perspectives... Very Happy
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group