Blender 101

From bernie's
Revision as of 16:36, 1 July 2023 by Bernie (talk | contribs) (Created page with "==Learning Blender== I'm slowly catching up and trying to learn blender so I'm just writing down a few things that frustrate me as an old maya/houdini user, and answer it as i go. === How do I animate text ? === Apparently you can't keyframe text easily. That sucks. However you can open up a python script <pre> # assumes you have a text object called 'Text' import bpy scene = bpy.context.scene obj = scene.objects['Text'] def recalculate_text(scene): text = '--'...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Learning Blender

I'm slowly catching up and trying to learn blender so I'm just writing down a few things that frustrate me as an old maya/houdini user, and answer it as i go.

How do I animate text ?

Apparently you can't keyframe text easily. That sucks. However you can open up a python script

# assumes you have a text object called 'Text'
import bpy

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

def recalculate_text(scene):
    text = '--'
    cf = scene.frame_current
    if cf < 1800:
        text = ' '
    elif cf < 1920:
        text = 8
    elif cf < 2030:
        text = 5
    elif cf < 2180:
        text = 1
    elif cf < 2300:
        text = 2
   
    obj.data.body = f'{text}'

bpy.app.handlers.frame_change_pre.append(recalculate_text)

Will modify this if I find a more user friendly way of doing this.

How do I lock camera to view