Skip to content

Instantly share code, notes, and snippets.

@zeffii

zeffii/pre_change.py

Created Sep 27, 2015
Embed
What would you like to do?
import bpy
scene = bpy.context.scene
obj = scene.objects['Text']
def recalculate_text(scene):
l = bpy.data.cameras['Camera'].lens
print(l)
obj.data.body = 'Current lens: ' + str(l)
bpy.app.handlers.frame_change_pre.append(recalculate_text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment