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 <bastien@blender.org>2021-06-23 10:51:11 +0300
committerBastien Montagne <bastien@blender.org>2021-06-23 11:37:00 +0300
commit82c17082ba0e53d782ac6be703d71d188a331dde (patch)
tree3bdb6f1a86bc8bf506d28046ada40b7f881dba86 /source/blender/blenloader/BLO_readfile.h
parent071799d4fc44f422abacbdad09bb45fb95de89f2 (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/blenloader/BLO_readfile.h')
-rw-r--r--source/blender/blenloader/BLO_readfile.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 89db216aada..307c09f8ff5 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -89,6 +89,35 @@ struct BlendFileReadParams {
int undo_direction; /* eUndoStepDir */
};
+typedef struct BlendFileReadReport {
+ /* General reports handling. */
+ struct ReportList *reports;
+
+ /* Timing informations .*/
+ struct {
+ double whole;
+ double libraries;
+ double lib_overrides;
+ double lib_overrides_resync;
+ double lib_overrides_recursive_resync;
+ } duration;
+
+ /* Count informations. */
+ struct {
+ /* Some numbers of IDs that ended up in a specific state, or required some specific process
+ * during this file read. */
+ int missing_libraries;
+ int missing_linked_id;
+ /* Number of root override IDs that were resynced. */
+ int resynced_lib_overrides;
+ } count;
+
+ /* Number of libraries which had overrides that needed to be resynced, and a single linked list
+ * of those. */
+ int resynced_lib_overrides_libraries_count;
+ struct LinkNode *resynced_lib_overrides_libraries;
+} BlendFileReadReport;
+
/* skip reading some data-block types (may want to skip screen data too). */
typedef enum eBLOReadSkip {
BLO_READ_SKIP_NONE = 0,
@@ -101,7 +130,7 @@ typedef enum eBLOReadSkip {
BlendFileData *BLO_read_from_file(const char *filepath,
eBLOReadSkip skip_flags,
- struct ReportList *reports);
+ struct BlendFileReadReport *reports);
BlendFileData *BLO_read_from_memory(const void *mem,
int memsize,
eBLOReadSkip skip_flags,
@@ -125,7 +154,7 @@ struct BLODataBlockInfo {
struct AssetMetaData *asset_data;
};
-BlendHandle *BLO_blendhandle_from_file(const char *filepath, struct ReportList *reports);
+BlendHandle *BLO_blendhandle_from_file(const char *filepath, struct BlendFileReadReport *reports);
BlendHandle *BLO_blendhandle_from_memory(const void *mem, int memsize);
struct LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh,