1
$\begingroup$

I make a animation of a cube that grows in size. I want to be able to render the changing values of the nearby text field. I see the numbers changing dynamically in the view-port but when I render out the final animation, the value doesn't change. Any advice?

My Code..

import bpy
scene = bpy.context.scene
obj = scene.objects['Text']

def recalculate_text(scene):
    obj.data.body = 'The Size Of The Cube Is... ' + '\n' + str( round(bpy.data.objects['Cube'].scale[2], 2) )

bpy.app.handlers.frame_change_pre.append(recalculate_text)
$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.