staggering script by liero

Hello blender users i am stuck with a problem i hope someone can answer or fix. i seen a really cool tutor on youtube https://www.youtube.com/watch?v=RVaRugRG-C4 it uses a script by a blender user name liero. a staggering/offset text but when i use it in blender 2.77 it gives me and error. im really curious if i did it wrong or forgotten a step because im not a python coder or familiar with blenders interface. i opened up the text editor and copy and paste the script and hit run script button and it gave me and error is there a step im missing or is this script not working ? :spin: thanks


just PM him and he will help !

happy bl

ryken you need be very careful with indentation in python
if you check the video again you’ll see tabs and double tabs, not just a left aligned block of code
I would recommend you to try more advanced solutions also, there’s the commotion addon, animation nodes and a few others… here’s the formatted script anyway


## offset actions in time

offset = 0.25 ## offset in frames
noise = 50 ## add some offset variation (set to 0 to disable)
reset = False ## enable to align actions to frame 0

import bpy, random
objs = [o for o in bpy.context.selected_objects if o.animation_data]

for i,o in enumerate(objs):
    act = o.animation_data.action
    delta = offset * i
    delta += random.random() * noise
    if reset: delta = act.frame_range[0] * -1
    
    for fcu in act.fcurves:
        for k in fcu.keyframe_points:
            k.co[0] += delta
            k.handle_left[0] += delta
            k.handle_right[0] += delta

Hey liero thanks for the quick response. I really dont know what is going on i just copy and paste the script but ill try again and also look into commotion addon and animation node Thank you very much :slight_smile: