I have this script, which does what i need with object actions.

import bpy

y_scale = 10

    for fcu in bpy.context.object.animation_data.action.fcurves:
        if fcu.data_path == "location":
            for kp in fcu.keyframe_points:
                kp.co.y *= y_scale
                kp.handle_left.y *= y_scale
                kp.handle_right.y *= y_scale
except TypeError:

But i actually need to do this with armature bones. Can somebody modify this script to make it work with bones on all actions presented in armature?

  • 1
    $\begingroup$ if fcu.data_path.endswith("location"): would prob do it. The location data path for pose bones is pose.bones["Bone"].location for example with bone name: "Bone". $\endgroup$ – batFINGER Oct 15 '16 at 6:13
  • $\begingroup$ It works now, thank you. How do i mark this answered? $\endgroup$ – BlenderTard Oct 15 '16 at 9:52
  • $\begingroup$ Noting that the modified script is still viable in 2.8, and quickly fixes broken actions and pose libraries after applying an armature's scale. Great work! $\endgroup$ – jackiejake Jul 21 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.