Hey guys I've been trying to get a script going for Proportional moving of keyframes to set values on a given frame (to help correct captured data).
I've got an action in my scene I've started poking around at, but setting the value via script doesn't work with proportional on. Is there a different method I should be using?
import bpy scene = bpy.context.window.scene startFrame = scene.frame_start endFrame = scene.frame_end scene.tool_settings.use_proportional_fcurve = True scene.tool_settings.proportional_size = 45 # Get a list of actions from the Blend file. actions = bpy.data.actions for action in actions: my_action = action.name print(action.name) # For each action get the Curve Groups. act_curve = bpy.data.actions[action.name].groups for curve in act_curve: print("curves", curve.name) # using the actions above. action = bpy.data.actions[my_action] for fcu in action.fcurves: print(fcu.data_path + " channel " + str(fcu.array_index)) for keyframe in fcu.keyframe_points: print(keyframe.co) #coordinates x,y # moving the last keyframe to a given value. bpy.data.actions[my_action].fcurves.keyframe_points[-1].co.y = 0