1
$\begingroup$

I have an animated model (link: https://www.dropbox.com/s/v9ked8yl2opl2or/robotERS_channelcleaning.blend?dl=0) that I am trying to rescale. Right now the armature and the mesh are not parented (yet).

The armature is scaled (object mode) to 0.01 on all axes. I want this size to be the new 1.0 scale. If I apply the scale to the armature, the rest pose looks good, but all animations are broken afterwards and I cannot find out why.

Any help is hugely appreciated!!

$\endgroup$
0
$\begingroup$

A script to do this.

enter image description here Result of running script, idle action, note unit scale

Method

For each action select and remove the location fcurves,

enter image description here via UI select all pose bones, search for "location" select and delete

Alternatively scale the location keyframes. In this case after applying scale to rig any translation fcurve would be 100x more than need be, this was the visible problem moving hips and spine apart a hundredfold As mentioned only rotation keyframes are needed for any bone with a parent.

for all pose bones set location to 0, 0, 0 if not already Select all pose bones, Set active pose bone location to all zero, right click copy all to selected will set all pose bones back to zero.

Then apply the scale. CtrlA scale.

Here is a script to do this. As with all scripts, backup first. Script rundown.

  • For a parent hierarchy of bones and in place animation will find location keyframes are not required. First part of script removes all location keyframes.
  • Any residual pose bone locations are reset to zero. All zero location and rotation is the rest pose.
  • Finally the scale is applied to your rig.

Select the rig object in object mode, and run script.

import bpy
for a in bpy.data.actions:
    for fc in a.fcurves:
        if "location" in fc.data_path:
            a.fcurves.remove(fc)

ob = bpy.context.object
for pb in ob.pose.bones:
    pb.location = (0, 0, 0)

bpy.ops.object.transform_apply(scale=True)

Finally you have rotation keyframes on the rig object, which also appear unnecessary.

$\endgroup$
  • $\begingroup$ Works perfectly! Thank you very much!! Is there no way to do it without scripting? $\endgroup$ – AudioGuy Jun 19 at 4:42
  • $\begingroup$ so what was the problem? How would you do it without script? Thanks in advance $\endgroup$ – moonboots Jun 19 at 5:36

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.