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 <b.mont29@gmail.com>2020-02-18 13:21:34 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-02-18 13:22:32 +0300
commitd4e38d99b20209b3ddf1488f00a8fbc1a7b785e9 (patch)
treeba00041029ad571ce392968975ce7fd57a5f5394 /source/blender/blenkernel/intern/main.c
parentabfdd1c697b5cd276bdd0c5dfda8fd2b48ff24f0 (diff)
libquery: add optional handling of 'UI' ID pointers.
Handling those through different ways /might/ be needed sometimes, but in most case this is just a nest of issues, since you can easily forget to take them into account. Note that this should be a 'non-functional' change, as this new behavior is not used anywhere yet.
Diffstat (limited to 'source/blender/blenkernel/intern/main.c')
-rw-r--r--source/blender/blenkernel/intern/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/main.c b/source/blender/blenkernel/intern/main.c
index 75bf74f63bf..659c3944edb 100644
--- a/source/blender/blenkernel/intern/main.c
+++ b/source/blender/blenkernel/intern/main.c
@@ -246,7 +246,7 @@ static int main_relations_create_idlink_cb(LibraryIDLinkCallbackData *cb_data)
}
/** Generate the mappings between used IDs and their users, and vice-versa. */
-void BKE_main_relations_create(Main *bmain)
+void BKE_main_relations_create(Main *bmain, const short flag)
{
if (bmain->relations != NULL) {
BKE_main_relations_free(bmain);
@@ -262,10 +262,14 @@ void BKE_main_relations_create(Main *bmain)
ID *id;
FOREACH_MAIN_ID_BEGIN (bmain, id) {
+ const int idwalk_flag = IDWALK_READONLY |
+ ((flag & MAINIDRELATIONS_INCLUDE_UI) != 0 ? IDWALK_INCLUDE_UI : 0);
BKE_library_foreach_ID_link(
- NULL, id, main_relations_create_idlink_cb, bmain->relations, IDWALK_READONLY);
+ NULL, id, main_relations_create_idlink_cb, bmain->relations, idwalk_flag);
}
FOREACH_MAIN_ID_END;
+
+ bmain->relations->flag = flag;
}
void BKE_main_relations_free(Main *bmain)