0
$\begingroup$

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

import bpy

y_scale = 10

try:
    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:
    pass

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?

$\endgroup$
  • $\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

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.