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:
Diffstat (limited to 'source/blender/blenkernel/intern/lib_override.c')
-rw-r--r--source/blender/blenkernel/intern/lib_override.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c
index 270d7ca358a..c93971e7b11 100644
--- a/source/blender/blenkernel/intern/lib_override.c
+++ b/source/blender/blenkernel/intern/lib_override.c
@@ -52,17 +52,12 @@
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BLO_readfile.h"
-
#include "BLI_ghash.h"
-#include "BLI_linklist.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
-#include "PIL_time.h"
-
#include "RNA_access.h"
#include "RNA_types.h"
@@ -963,7 +958,7 @@ bool BKE_lib_override_library_resync(Main *bmain,
Collection *override_resync_residual_storage,
const bool do_hierarchy_enforce,
const bool do_post_process,
- BlendFileReadReport *reports)
+ ReportList *reports)
{
BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id_root));
@@ -1291,7 +1286,7 @@ bool BKE_lib_override_library_resync(Main *bmain,
id_root = id_root_reference->newid;
if (user_edited_overrides_deletion_count > 0) {
- BKE_reportf(reports != NULL ? reports->reports : NULL,
+ BKE_reportf(reports,
RPT_WARNING,
"During resync of data-block %s, %d obsolete overrides were deleted, that had "
"local changes defined by user",
@@ -1443,11 +1438,8 @@ static void lib_override_library_main_resync_on_library_indirect_level(
ViewLayer *view_layer,
Collection *override_resync_residual_storage,
const int library_indirect_level,
- BlendFileReadReport *reports)
+ ReportList *reports)
{
- const bool do_reports_recursive_resync_timing = (library_indirect_level != 0);
- const double init_time = do_reports_recursive_resync_timing ? PIL_check_seconds_timer() : 0.0;
-
BKE_main_relations_create(bmain, 0);
BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
@@ -1538,7 +1530,6 @@ static void lib_override_library_main_resync_on_library_indirect_level(
(!ID_IS_LINKED(id) && library_indirect_level != 0)) {
continue;
}
- Library *library = id->lib;
int level = 0;
/* In complex non-supported cases, with several different override hierarchies sharing
@@ -1550,21 +1541,12 @@ static void lib_override_library_main_resync_on_library_indirect_level(
id = lib_override_library_main_resync_find_root_recurse(id, &level);
id->tag &= ~LIB_TAG_LIB_OVERRIDE_NEED_RESYNC;
BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id));
- BLI_assert(id->lib == library);
do_continue = true;
- CLOG_INFO(&LOG, 2, "Resyncing %s (%p)...", id->name, library);
+ CLOG_INFO(&LOG, 2, "Resyncing %s (%p)...", id->name, id->lib);
const bool success = BKE_lib_override_library_resync(
bmain, scene, view_layer, id, override_resync_residual_storage, false, false, reports);
CLOG_INFO(&LOG, 2, "\tSuccess: %d", success);
- if (success) {
- reports->count.resynced_lib_overrides++;
- if (library_indirect_level > 0 &&
- BLI_linklist_index(reports->resynced_lib_overrides_libraries, library) < 0) {
- BLI_linklist_prepend(&reports->resynced_lib_overrides_libraries, library);
- reports->resynced_lib_overrides_libraries_count++;
- }
- }
break;
}
FOREACH_MAIN_LISTBASE_ID_END;
@@ -1574,10 +1556,6 @@ static void lib_override_library_main_resync_on_library_indirect_level(
}
FOREACH_MAIN_LISTBASE_END;
}
-
- if (do_reports_recursive_resync_timing) {
- reports->duration.lib_overrides_recursive_resync += PIL_check_seconds_timer() - init_time;
- }
}
static int lib_override_sort_libraries_func(LibraryIDLinkCallbackData *cb_data)
@@ -1655,7 +1633,7 @@ static int lib_override_libraries_index_define(Main *bmain)
void BKE_lib_override_library_main_resync(Main *bmain,
Scene *scene,
ViewLayer *view_layer,
- BlendFileReadReport *reports)
+ ReportList *reports)
{
/* We use a specific collection to gather/store all 'orphaned' override collections and objects
* generated by re-sync-process. This avoids putting them in scene's master collection. */