Blender Git Commit Log

Git Commits -> Revision 1d05f0d

Revision 1d05f0d by Brecht Van Lommel (master)
October 18, 2018, 18:10 (GMT)
Fix Copy Objects 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: 1d05f0dc22e3fedfed3b1691eac3ece26a06a17b
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