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:
authorJeroen Bakker <jbakker>2022-02-11 16:53:08 +0300
committerJeroen Bakker <jeroen@blender.org>2022-02-11 16:53:33 +0300
commita71a513def202b119328035dbd68e86c2c47f7ac (patch)
tree86ed98ed6daf1eab20cad11348eafa65fa2daaa9 /source/blender/blenkernel/intern/lib_id.c
parent811cbb6c0a426243d957fa00f7ddec15b1d4ae62 (diff)
Remap multiple items in referenced data.
This patch increases the performance when remapping data. {D13615} introduced a mechanism to remap multiple items in a single go. This patch uses the same mechanism when remapping data inside ID datablocks. Benchmark results when loading the village scene of sprite fright on AMD Ryzen 7 3800X 8-Core Processor Before this patch 115 seconds When patch applied less than 43 seconds There is still some room for improvement by porting relink code. Reviewed By: mont29 Maniphest Tasks: T95279 Differential Revision: https://developer.blender.org/D14043
Diffstat (limited to 'source/blender/blenkernel/intern/lib_id.c')
-rw-r--r--source/blender/blenkernel/intern/lib_id.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index 2baecea51ff..7cd3204f3f1 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -1121,6 +1121,14 @@ void BKE_libblock_init_empty(ID *id)
BLI_assert_msg(0, "IDType Missing IDTypeInfo");
}
+void BKE_libblock_runtime_reset_remapping_status(ID *id)
+{
+ id->runtime.remap.status = 0;
+ id->runtime.remap.skipped_refcounted = 0;
+ id->runtime.remap.skipped_direct = 0;
+ id->runtime.remap.skipped_indirect = 0;
+}
+
/* ********** ID session-wise UUID management. ********** */
static uint global_session_uuid = 0;