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-03-19 21:37:00 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-03-19 21:39:23 +0300
commit12b621059a6f1337e8ae8fdd9533e7808225e71e (patch)
treed04a2fddc28152235191e2d93884f4d143410d85 /source/blender/windowmanager/intern/wm_files_link.c
parent0b7854323d41f3a1a55a40ddf76a90e2017a0784 (diff)
Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.
Mpving utils from idcode to idtype proved to be somewhat painful for some reasons, but now all looks good. Had to add a fake/empty shell for the special snowflake too, `ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files_link.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 58eb194c7f7..c2c3b24469e 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -56,7 +56,7 @@
#include "BKE_main.h"
#include "BKE_report.h"
-#include "BKE_idcode.h"
+#include "BKE_idtype.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
@@ -304,11 +304,11 @@ static bool wm_link_append_item_poll(ReportList *reports,
return false;
}
- idcode = BKE_idcode_from_name(group);
+ idcode = BKE_idtype_idcode_from_name(group);
/* XXX For now, we do a nasty exception for workspace, forbid linking them.
* Not nice, ultimately should be solved! */
- if (!BKE_idcode_is_linkable(idcode) && (do_append || idcode != ID_WS)) {
+ if (!BKE_idtype_idcode_is_linkable(idcode) && (do_append || idcode != ID_WS)) {
if (reports) {
if (do_append) {
BKE_reportf(reports,
@@ -444,7 +444,8 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
lib_idx = POINTER_AS_INT(BLI_ghash_lookup(libraries, libname));
- item = wm_link_append_data_item_add(lapp_data, name, BKE_idcode_from_name(group), NULL);
+ item = wm_link_append_data_item_add(
+ lapp_data, name, BKE_idtype_idcode_from_name(group), NULL);
BLI_BITMAP_ENABLE(item->libraries, lib_idx);
}
}
@@ -456,7 +457,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
WMLinkAppendDataItem *item;
wm_link_append_data_library_add(lapp_data, libname);
- item = wm_link_append_data_item_add(lapp_data, name, BKE_idcode_from_name(group), NULL);
+ item = wm_link_append_data_item_add(lapp_data, name, BKE_idtype_idcode_from_name(group), NULL);
BLI_BITMAP_ENABLE(item->libraries, 0);
}
@@ -703,7 +704,7 @@ static void lib_relocate_do(Main *bmain,
ID *id = lbarray[lba_idx]->first;
const short idcode = id ? GS(id->name) : 0;
- if (!id || !BKE_idcode_is_linkable(idcode)) {
+ if (!id || !BKE_idtype_idcode_is_linkable(idcode)) {
/* No need to reload non-linkable datatypes,
* those will get relinked with their 'users ID'. */
continue;