Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-04-06 20:19:30 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-04-06 20:19:30 +0400
commitee307bec882a639c4574480dc7d0505b9812b8dc (patch)
treefdfc61e03f1146b8d5aed1f050a4d22a85fd5b1e /source/blender/blenloader
parentf7a0499f167613206cef3e707cc9e3ef04a5eb30 (diff)
Fix #30798: when linking a datablock, it got simply added to the back of the
list, now the linked datablocks are sorted by name too (but still appear after the non-linked datablocks).
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 798c48dfaac..737a182bbe0 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -14587,9 +14587,17 @@ static ID *append_named_part(Main *mainl, FileData *fd, const char *idname, cons
found= 1;
id= is_yet_read(fd, mainl, bhead);
if (id==NULL) {
+ /* not read yet */
read_libblock(fd, mainl, bhead, LIB_TESTEXT, &id);
+
+ if (id) {
+ /* sort by name in list */
+ ListBase *lb= which_libbase(mainl, idcode);
+ id_sort_by_name(lb, id);
+ }
}
else {
+ /* already linked */
printf("append: already linked\n");
oldnewmap_insert(fd->libmap, bhead->old, id, 1);
if (id->flag & LIB_INDIRECT) {