This is the script I've got. It just basically offsets every selected objects animation for the other one as shown in this Tutorial
import bpy
obj = bpy.context.selected_objects
objlist = len(obj)
offset = range(objlist+1)
for i in range(objlist):
animData = obj[i].animation_data
action = animData.action
fcurves = action.fcurves
for curve in fcurves:
keyframePoints = curve.keyframe_points
for keyframe in keyframePoints:
keyframe.co[0] += offset[i]
keyframe.handle_left[0] += offset[i]
keyframe.handle_right[0] += offset[i]
It works alright but when I change it to:
import bpy
obj = bpy.context.selected_pose_bones
objlist = len(obj)
offset = range(objlist+1)
for i in range(objlist):
animData = obj[i].animation_data
action = animData.action
fcurves = action.fcurves
for curve in fcurves:
keyframePoints = curve.keyframe_points
for keyframe in keyframePoints:
keyframe.co[0] += offset[i]
keyframe.handle_left[0] += offset[i]
keyframe.handle_right[0] += offset[i]
I get this error
AttributeError:'PoseBone' object has no attribute 'animation_data'
object.animation_datanotpose_bone.animation_data– sambler May 30 '15 at 12:13fcurves = bpy.context.active_object.animation_data.action.fcurvesthen saidkeyframePoints = fcurves[i].keyframe_pointsand finallyfor keyframe in keyframePoints:___keyframe.handle_left[0] += .01Which moved the first chanel on the actions furve +1 in X direction Working Final Version here >> https://www.dropbox.com/s/73uzj5e7i1vpafw/move_bone_Fcurves.py?dl=0. thanks for the tip :) – May 30 '15 at 15:01