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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-06-16 16:49:10 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-06-16 16:54:22 +0300
commitbde19b57d61968b661b568be896ead91f90cc708 (patch)
tree559cd22139853b20a8ddb1daef117b02e025a8a3 /source/blender/windowmanager
parentdbf7d30744512ac733785ebdf0a163d54a5c8f54 (diff)
Cleanup from review comments.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index ad5afdabc85..a4dea8165b2 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -591,7 +591,9 @@ static void lib_relocate_do(Main *bmain, WMLinkAppendData *lapp_data, ReportList
BLI_assert(new_id);
}
if (new_id) {
-// printf("before remap, old_id users: %d, new_id users: %d\n", old_id->us, new_id->us);
+#ifdef PRINT_DEBUG
+ printf("before remap, old_id users: %d, new_id users: %d\n", old_id->us, new_id->us);
+#endif
BKE_libblock_remap_locked(bmain, old_id, new_id, remap_flags);
if (old_id->flag & LIB_FAKEUSER) {
@@ -599,7 +601,9 @@ static void lib_relocate_do(Main *bmain, WMLinkAppendData *lapp_data, ReportList
id_fake_user_set(new_id);
}
-// printf("after remap, old_id users: %d, new_id users: %d\n", old_id->us, new_id->us);
+#ifdef PRINT_DEBUG
+ printf("after remap, old_id users: %d, new_id users: %d\n", old_id->us, new_id->us);
+#endif
/* In some cases, new_id might become direct link, remove parent of library in this case. */
if (new_id->lib->parent && (new_id->tag & LIB_TAG_INDIRECT) == 0) {
@@ -737,7 +741,9 @@ static int wm_lib_relocate_exec_do(bContext *C, wmOperator *op, bool do_reload)
BLI_join_dirfile(path, sizeof(path), root, libname);
if (BLI_path_cmp(lib->filepath, path) == 0) {
+#ifdef PRINT_DEBUG
printf("We are supposed to reload '%s' lib (%d)...\n", lib->filepath, lib->id.us);
+#endif
do_reload = true;
@@ -747,7 +753,9 @@ static int wm_lib_relocate_exec_do(bContext *C, wmOperator *op, bool do_reload)
else {
int totfiles = 0;
+#ifdef PRINT_DEBUG
printf("We are supposed to relocate '%s' lib to new '%s' one...\n", lib->filepath, libname);
+#endif
/* Check if something is indicated for relocate. */
prop = RNA_struct_find_property(op->ptr, "files");
@@ -774,13 +782,17 @@ static int wm_lib_relocate_exec_do(bContext *C, wmOperator *op, bool do_reload)
continue;
}
+#ifdef PRINT_DEBUG
printf("\t candidate new lib to reload datablocks from: %s\n", path);
+#endif
wm_link_append_data_library_add(lapp_data, path);
}
RNA_END;
}
else {
+#ifdef PRINT_DEBUG
printf("\t candidate new lib to reload datablocks from: %s\n", path);
+#endif
wm_link_append_data_library_add(lapp_data, path);
}
}
@@ -805,7 +817,9 @@ static int wm_lib_relocate_exec_do(bContext *C, wmOperator *op, bool do_reload)
item = wm_link_append_data_item_add(lapp_data, id->name + 2, idcode, id);
BLI_BITMAP_SET_ALL(item->libraries, true, lapp_data->num_libraries);
+#ifdef PRINT_DEBUG
printf("\tdatablock to seek for: %s\n", id->name);
+#endif
}
}
}