Blender Git Commit Log

Git Commits -> Revision de3f930

Revision de3f930 by Brecht Van Lommel (master)
October 18, 2018, 18:21 (GMT)
Fix Copy Selection to Buffer breaking library paths.

This is a bug experienced by animators in the Blender Studio that developers
have been trying to fix for a /long/ time.

What happens is that partial file writing extracts the needed datablocks from
the main list of datablocks into a smaller one. Afterwards they are added back
to the main list, but in some cases not exactly in the same order.

There is file path remapping code that depends on the datablocks being in
exactly the same order as before, and when this was not the case filepaths
would get swapped between datablocks

The reason datablocks are not restored in the same order is because the sorting
of datablocks by name is a) case insensitive and b) undefined if there are
multiple datablocks with the same name from different libraries. This should
be made well defined, but the fix in this commit is simpler.

The way animators ran into this bug is that they use the Copy Attributes addon
a lot, which has as the first item in the menu Copy Selection to Buffer. In
some cases this would be clicked accidentally when menu is near the edge of the
window, breaking the library paths which would only be noticed a much later on
file save and reload.

The way this bug was finally tracked down is that it was suspected that the
undo system was the cause, and so Bastien added library validation for undo.
When Hjalti then did undo and noticed the error, he remembered accidentally
clicking Copy Selection to Buffer just before, and we could finally reproduce
the bug.

Commit Details:

Full Hash: de3f9303eb958d34e4793ff91fafedda0b41ee98
Parent Commit: 5f82225
Lines Changed: +17, -9

1 Modified Path:

/source/blender/blenkernel/intern/blendfile.c (+17, -9) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021