Page MenuHome

Scaling armature from smaller size to scale 1 results in broken animations (IPO not updated?) and non-connected bones is pose is not rest one.
Closed, ArchivedPublic

Description

System Information
Ubuntu 14.04 Gnome Edition on Intel HD 4000 and
Debian Sid (updated to latest packages) with Nvidia GTS 8600

Blender Version
Broken: All (Tested on 2.71 and 2.69)
Worked: Never

Short description of error
Somewhere between missing functionality and a Bug, it seems that if your armature is scaled to negative values (not tested with positive but should give the same result) and apply the scale in object mode (back to 1,1,1), the animation keyframes do not get scaled accordingly.
It seems the IPO information is not translated, and the functionality to convert that seems to be missing.

This has been a issue for quite a long time, exporting models to other formats (ie, game engines requiring scale 1 for things like parent relations), and multiple reports could be found on the Blenderartists forum (example of matching description is http://blenderartists.org/forum/archive/index.php/t-195566.html)

Exact steps for others to reproduce the error
Take any model with Armature and animations, scale in object mode (to get big visual results scale to 0.019 or something like that), apply the scale in object mode, play a animation in pose mode.

Details

Type
Bug

Event Timeline

Joey Ferwerda (TheOnlyJoey) created this task.
Joey Ferwerda (TheOnlyJoey) raised the priority of this task from to Needs Triage by Developer.

Someone on IRC pointed out that my description was not quite clear on the values.
I did not try with negative values, just with values below 1 (so 0.019)

Please attach a simple file with the armature and sample animation. This is all time that can be spared from the developer that can look at it.

http://www.pasteall.org/blend/31368 example blend
To reproduce a simple case:
First check the walk animation, then apply the scale of the armature in object mode, then play animation again.

Bastien Montagne (mont29) claimed this task.

Thanks for the report, but there is no bug here, this was never intended to work - when you apply transforms, you move them from object level to "data" level - animation remains on object level, so it is now applied over a new "data" base, you can't expect this to work.

@Bastien Montagne (mont29): I disagree about this not being a bug, although I can accept from a developers point of view that this is not intended to work originally. It is unexpected behaviour and I think this should be addressed.

This is a big problem though, since this basically produced garbage and the fastest way of achieving this is using a external modeller (export, import in other tool, scale, export, import back in blender), which is not ideal.
Some external (game) engines require the scale of your objects to be 1,1,1 upon import, or otherwise rescale or ignore your model, or in some cases use the scale for setting parent relations (which results in even more unexpected behaviour).

@Bastien Montagne (mont29) As you say, applying a transform pushes it down one level. However, even in the current implementation, I don't think it just pushes it from the object to the data layer. The scale of child objects seems to be changed, so they don't unexpectedly grow or shrink when the parent's scale is applied.

Bearing this in mind, isn't it most logical to say that applying a transform moves it from the object to everything that is one level below? It already pushes it from the object to the object's child objects and underlying data block. Wouldn't it be reasonable to say that it should be pushed to the underlying animation strip as well?

It's also hard to think of a case where the current behaviour is helpful. (Note that if there are multiple copies of the armature, you can't apply the scale anyway. You couldn't have a problem where you apply the scale to one copy of an armature and break the other copies.) On the other hand, as @Joey Ferwerda (TheOnlyJoey) pointed out, there are certainly uses for the other behaviour.

(Of course I respect your decision not to change this behaviour. In an open source project, the person who writes the code has to be the one who makes the decisions! And thank you for the time you have spent writing code, by the way.)

OK, so checked a bit more on this, and compared with what happens when applying scale to an object having children:

  • Static position of children is updated to keep same 'visual transform'
  • But with animation, fcurves are not updated, so result looks broken.

I maintain anim part is not a bug, at most a TODO/feature request, but rather hard to make it working ok in all cases imho.

Static issue regarding armatures however should be handled I think - applying transform on animated object is calling for issues, but doing so on non-animated one should work as expected.

Will try to handle this…

Bastien Montagne (mont29) renamed this task from Scaling armature from smaller size to scale 1 results in broken animations (IPO not updated?) to Scaling armature from smaller size to scale 1 results in broken animations (IPO not updated?) and non-connected bones is pose is not rest one..Sep 7 2014, 6:04 PM
Bastien Montagne (mont29) triaged this task as Normal priority.

Hrmm… further testing, in rest pose apply scale works perfect, it breaks only if you edit pose first… so not really sure whether we want to support that…

Let’s see whether Joshua has some advice here.

Good to see this has been reopened.

gaia (on irc) has created a python script which allowed for this functionality to work, with a option to set the scale of a skeleton and re-scaling a single or all actions with it.
If this would not work out as default functionality (which is fine), it would be nice to have a optional scale function.
The way fill's are handled (grid fill/beauty fill etc) is a good example of allowing for multiple 'default' functionality.

Pete Chown (PeteX) added a comment.EditedSep 7 2014, 11:05 PM

I was forgetting that there might be multiple actions associated with a particular armature. Would it be unexpected or undesirable if they all got scaled when the armature scale was applied? All child objects get their scale changed, and that seems like an analogous case.

In any case, I agree with @Joey Ferwerda (TheOnlyJoey); I don't really care about the default behaviour, as long as I have the option of scaling the animations.

(I suspect this may be a slight culture clash between people doing games and people doing pre-rendered animations. If you're doing an animation, it probably doesn't matter if objects are scaled. Game engines, for some reason, are incredibly picky about this sort of thing. You might ask why they don't just apply the scale when you import the object—I've certainly wondered that—but they never seem to. To avoid problems you always want to make the character as simple as possible, and applying the scale is part of that.)

So, talked with Joshua on IRC, wa agreed that even though this would be great from a user PoV, there is no bug here, it's a mix of TODO and design task. Added a note in our TODO list.

Time to archive.