I got an animation with blinking lights, animated by an emission and transparent node connected to a mix shader. I want them to go on and off after eachother, instead of all together at one time. Is their a possibility to shear these keyframes in the Dope Sheet? If I use the Shear tool it will crash, so is there a specific way to do this for keyframes?
Assuming the lamps are sortable by their name and the animation (which is supposed to be shifted) is the only animation on the object, the you could use a python script to shift the keyframes of all fcurves of an object.
To use the script, selected the objects and execute the script. The selected objects must have an existing animation. First make sure to make the materials single user, by selecting all objects, then pressing U in the 3D View and choosing Material and Texture.
By changing the value of the
offset_amount variable, you can change the timing.
0 < x < 1 are also possible.
import bpy offset_amount = 2.0 # get selected objects sel = bpy.context.selected_objects # sort them by name sel.sort(key=lambda x: x.name) # loop through all selected objects for i, s in enumerate(sel): # get the fcurves of the active action # of the material of the object fcurves = s.material_slots.material.node_tree.animation_data.action.fcurves # loop through all fcurves for fc in fcurves: # loop through all keyframes for kp in fc.keyframe_points: # change the x (time) value of the keyframe kp.co.x += offset_amount * i