diff options
author | Bastien Montagne <bastien@blender.org> | 2021-06-23 10:51:11 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-06-23 11:37:00 +0300 |
commit | 82c17082ba0e53d782ac6be703d71d188a331dde (patch) | |
tree | 3bdb6f1a86bc8bf506d28046ada40b7f881dba86 /source/blender/editors | |
parent | 071799d4fc44f422abacbdad09bb45fb95de89f2 (diff) |
Revert "Revert "Enhanced stats/reports for blendfile reading.""
This reverts commit rB3a48147b8ab92, and fixes the issues with linking
etc.
Change compared to previous buggy commit (rBf8d219dfd4c31) is that
new `BlendFileReadReports` reports are now passed to the lowest level
function generating the `FileData` (`filedata_new()`), which ensures
(and asserts) that all code using it does have a valid non-NULL pointer
to a `BlendFileReadReport` data.
Sorry for the noise, it's always when you think a change is trivial and
do not test it well enough that you end up doing those kind of
mistakes...
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 37a32164cfc..e43000d3f64 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -2894,7 +2894,7 @@ static int filelist_readjob_list_lib(const char *root, ListBase *entries, const } /* there we go */ - libfiledata = BLO_blendhandle_from_file(dir, NULL); + libfiledata = BLO_blendhandle_from_file(dir, &(BlendFileReadReport){.reports = NULL}); if (libfiledata == NULL) { return nbr_entries; } diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index f809bb13b42..d59d04b6ac2 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -86,6 +86,8 @@ #include "UI_resources.h" #include "UI_view2d.h" +#include "../../blender/blenloader/BLO_readfile.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -930,8 +932,14 @@ static void id_override_library_resync_fn(bContext *C, te->store_elem->id->tag |= LIB_TAG_DOIT; } - BKE_lib_override_library_resync( - bmain, scene, CTX_data_view_layer(C), id_root, NULL, do_hierarchy_enforce, true, reports); + BKE_lib_override_library_resync(bmain, + scene, + CTX_data_view_layer(C), + id_root, + NULL, + do_hierarchy_enforce, + true, + &(struct BlendFileReadReport){.reports = reports}); WM_event_add_notifier(C, NC_WINDOW, NULL); } |