Saturday, August 13, 2011

FAQ - Importing actions from 2.4x to 2.5

For the nth time in as many weeks, someone has run into (and complained) that they couldn't import their actions from 2.4x to 2.5.

The simple answer is this: Do NOT MIX 2.4 and 2.5 files.

If you need to do anything with 2.4x files in 2.5, go through and save copies of them in 2.5 first, and then work with the 2.5 versions.

Now, if those 2.4 files used linking, etc., you are advised to start from your library files, and work down the linking chains so that you don't end up inadvertantly corrupting stuff in between.

So, some of you may be wondering why we need to do this.

With the new animation system in 2.5, the conversion process for animation data saved in the old system is a non-trivial exercise. It involves some fairly extensive reshuffling of data (e.g. splitting out drivers from animation) from one datablock to another, changing links to datablocks (e.g. ipo-blocks -> action blocks) and adding new datatypes (animation data to encapsulate all animation data across the board), while also adapting some of the old stuff saved (e.g. per keyframe interpolation mode vs per curve, getting rid of the non-standard rotations-in-degrees/10 hacks), with all of these manipulations needing to take place over the whole internal database.

As I very quickly discovered nearly 3 years ago now, the standard version patching code (do_versions() in readfile.c) was simply not up to the task. From there, you could at most access the data for a single datablock reliably (as datablock linkages hadn't been resolve yet at that stage); and changing links between them, modifying and adapting linkages, and reshuffling data were equally out of the question. So, as a result, this process has had to be done as a separate pass once all the data in the file has been loaded.

The implication of this though, is that it's impossible to append/link data in from files and have this data get converted to the new system.

Now, attempts have been made over these last few years to try and get this working. However, as everyone who's tried has found, you just CANNOT do this without getting some very weird crashes and data corruption.

With 2.4x long considered the "outdated" and unsupported versions Blender (personally, I stopped supporting - bugfixing, technical advice, etc. - 2.4x over 2 years ago now), we should hopefully have increasingly less files that still need to be ported to the new system.

No comments:

Post a Comment