# How to rotate bone group 90 degrees for all frames?

Let me preface my question by saying I'm a very newbie user. I have a weapon model and the arms need to be rotated 90 degrees for every frame for the whole animation (and i've got a few more weapon models that need this to be done, but unfortunately it's a very lengthy process.) Is there anyway I can change the Rotation of a bone group for all frames of an animation?

Here's a picture of what I want to do, if it helps:

• Have you tried selecting the entire curve in the graph editor for the correct axis (the one you want to rotate around) and moving it up/down 90 units? BTW I can't see your picture...please post it with the BSE (Blender Stack Exchange) image tool. – JakeD Aug 23 '16 at 14:29
• i'll try that now, and I updated the image. thank you – 343N Aug 23 '16 at 14:32
• First of all, you shouldn't have a keyframe every frame : ) – JakeD Aug 23 '16 at 14:34
• maybe I got the terminology mixed up. i've just decompiled a model and want to apply the rotation every keyframe since it must have been edited in the decompile process. i can't figure out how to actually use the graph editor to change it for all of the future keyframes – 343N Aug 23 '16 at 14:42

## 1 Answer

The armature should not have really have keyframes on its object at all: just its bones. Then the rotation for the object could be easily applied with Ctrl-A > Apply Rotation.

If the above is absolutely impossible, you could try something like this, but I will warn you it'll get messy fast! This will iterate over every frame and apply the rotation, then add a keyframe.

import bpy

scene = bpy.context.scene

for frame in range(scene.frame_start, scene.frame_end + 1):
scene.frame_set(frame)
bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
bpy.ops.anim.keyframe_insert_menu(type='Rotation')


You could also, like I said before, do something like this (if you're fine with the rotations getting screwed for the time being):

• i need everything to rotate off of that center point, i don't want to rotate the bones individually if you get me, which is what it seems like this does. ill try your script out first! thanks – 343N Aug 24 '16 at 5:20
• the python script failed: i.imgur.com/r02uQRY.png – 343N Aug 24 '16 at 5:37