From 12b621059a6f1337e8ae8fdd9533e7808225e71e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 19 Mar 2020 19:37:00 +0100 Subject: 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`... --- source/blender/windowmanager/intern/wm_operators.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/windowmanager/intern/wm_operators.c') diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 625e7878b07..0695479d9fb 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -74,7 +74,7 @@ #include "BKE_screen.h" /* BKE_ST_MAXNAME */ #include "BKE_unit.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BLF_api.h" @@ -1256,7 +1256,7 @@ ID *WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short i BKE_reportf(op->reports, RPT_ERROR, "Cannot read %s '%s': %s", - BKE_idcode_to_name(idcode), + BKE_idtype_idcode_to_name(idcode), path, errno ? strerror(errno) : TIP_("unsupported format")); return NULL; @@ -1278,7 +1278,7 @@ ID *WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short i RNA_string_get(op->ptr, "name", name); id = BKE_libblock_find_name(bmain, idcode, name); if (!id) { - BKE_reportf(op->reports, RPT_ERROR, "%s '%s' not found", BKE_idcode_to_name(idcode), name); + BKE_reportf(op->reports, RPT_ERROR, "%s '%s' not found", BKE_idtype_idcode_to_name(idcode), name); return NULL; } id_us_plus(id); @@ -3511,12 +3511,12 @@ static int previews_clear_exec(bContext *C, wmOperator *op) printf("%s: %d, %d, %d -> %d\n", id->name, GS(id->name), - BKE_idcode_to_idfilter(GS(id->name)), + BKE_idtype_idcode_to_idfilter(GS(id->name)), id_filters, - BKE_idcode_to_idfilter(GS(id->name)) & id_filters); + BKE_idtype_idcode_to_idfilter(GS(id->name)) & id_filters); #endif - if (!(BKE_idcode_to_idfilter(GS(id->name)) & id_filters)) { + if (!(BKE_idtype_idcode_to_idfilter(GS(id->name)) & id_filters)) { continue; } -- cgit v1.2.3