Skip to content

Instantly share code, notes, and snippets.

@zeffii
Created September 27, 2015 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeffii/3e98014f3ee7b050eb03 to your computer and use it in GitHub Desktop.
Save zeffii/3e98014f3ee7b050eb03 to your computer and use it in GitHub Desktop.
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