# Python Script for Armature Scale -

I was wondering what the python script the following sequence would look like. I'd like to be able to run the code in the text editor instead of manually doing it every time I need a new animation.

For a selected armature > clear all keyframes for scale x,y,z > and change the scale values to .011? In order to make sure that the scale is .011 through the whole animation.

Thank you very much for your time, I'd really appreciate the help!

Try this. Select the armature before running it (but the mode shouldn't matter this time).

import bpy
ob = bpy.context.active_object
assert ob.type == 'ARMATURE'
assert ob.animation_data and ob.animation_data.action
action = ob.animation_data.action
for fc in [*action.fcurves]:
if fc.data_path == "scale":
action.fcurves.remove(fc)
ob.scale = [0.011] * 3

• Well, it did something lol. Not exactly what it was supposed to, looks like the armature disappeared. Here's a link to the test file with the armature in question: drive.google.com/file/d/1-QGTIa7qmaGfaoyoxq0iASE3rqC1g-hQ/… If there is no way to achieve this, it's probably fine, but it would save a lot of time if we could find a way to get it to work :( – GoodNight Sep 3 '20 at 0:24
• Oh, you only want to do it to the object itself? That script did it for all the bones. It's even easier to do it just for the object, but it doesn't seem like it would save much time. I'll update... – scurest Sep 3 '20 at 0:34
• Oh yeah, just the entire armature object, it's true it only shaves a few seconds, BUT if I'm doing it every day, multiple times a day, those seconds count. Works perfectly :) Out of curiosity, if I wanted to combine this code with the bone rename code from the last post into a single script, do I just add them together? Or what would that look like? – GoodNight Sep 3 '20 at 0:58
• Pasting them one after is a bit crude but will work fine. – scurest Sep 3 '20 at 1:04
• Thank you, all my problems have been perfectly resolved. I've hope you have a wonderful day, and much appreciate the clear and concise code you've provided :) – GoodNight Sep 3 '20 at 2:56