[Bf-blender-cvs] [f609e01] missing-libs: Cleanup & comments from review.
Bastien Montagne
noreply at git.blender.org
Tue Oct 20 14:25:10 CEST 2015
Commit: f609e01fb55a09e56fb6f8efbd1ec89cb1c8902c
Author: Bastien Montagne
Date: Tue Oct 20 14:24:30 2015 +0200
Branches: missing-libs
https://developer.blender.org/rBf609e01fb55a09e56fb6f8efbd1ec89cb1c8902c
Cleanup & comments from review.
===================================================================
M source/blender/blenloader/intern/readfile.c
M source/blender/makesdna/DNA_ID.h
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index dda5c11..6545a3b 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10090,6 +10090,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
}
/* test if there are unread libblocks */
+ /* XXX This code block is kept for 2.77, until we are sure it never gets reached anymore. Can be removed later. */
for (mainptr = mainl->next; mainptr; mainptr = mainptr->next) {
a = set_listbasepointers(mainptr, lbarray);
while (a--) {
@@ -10098,11 +10099,12 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
for (id = lbarray[a]->first; id; id = idn) {
idn = id->next;
if (id->flag & LIB_READ) {
- printf("SHALL NOT HAPPEN ANYMORE!!!!!!!\n");
+ BLI_assert(0);
BLI_remlink(lbarray[a], id);
blo_reportf_wrap(
basefd->reports, RPT_WARNING,
- TIP_("LIB ERROR: %s: '%s' unread lib block missing from '%s', parent '%s'"),
+ TIP_("LIB ERROR: %s: '%s' unread lib block missing from '%s', parent '%s' - "
+ "Please file a bug report if you see this message"),
BKE_idcode_to_name(GS(id->name)),
id->name + 2,
mainptr->curlib->filepath,
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 7f66a40..c2901b8 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -282,6 +282,7 @@ enum {
LIB_TESTIND = (LIB_NEED_EXPAND | LIB_INDIRECT),
LIB_READ = 1 << 4,
LIB_NEED_LINK = 1 << 5,
+ /* tag datablock as a place-holder (because the real one could not be linked from its library e.g.). */
LIB_MISSING = 1 << 6,
LIB_NEW = 1 << 8,
More information about the Bf-blender-cvs
mailing list