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/editors/space_outliner/outliner_draw.c | 4 ++-- source/blender/editors/space_outliner/outliner_edit.c | 6 +++--- source/blender/editors/space_outliner/outliner_tree.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/editors/space_outliner') diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index dcef1c9db6a..3c569a71e93 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -46,7 +46,7 @@ #include "BKE_deform.h" #include "BKE_fcurve.h" #include "BKE_gpencil.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BKE_layer.h" #include "BKE_lib_id.h" #include "BKE_library.h" @@ -2827,7 +2827,7 @@ int tree_element_id_type_to_index(TreeElement *te) { TreeStoreElem *tselem = TREESTORE(te); - const int id_index = tselem->type == 0 ? BKE_idcode_to_index(te->idcode) : INDEX_ID_GR; + const int id_index = tselem->type == 0 ? BKE_idtype_idcode_to_index(te->idcode) : INDEX_ID_GR; if (id_index < INDEX_ID_OB) { return id_index; } diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index f2a3bad03b4..57bf34f1e18 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -44,7 +44,7 @@ #include "BKE_blender_copybuffer.h" #include "BKE_collection.h" #include "BKE_context.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BKE_layer.h" #include "BKE_lib_id.h" #include "BKE_lib_query.h" @@ -2194,7 +2194,7 @@ static void outliner_orphans_purge_tag(ID *id, int *num_tagged) if (id->us == 0) { id->tag |= LIB_TAG_DOIT; num_tagged[INDEX_ID_NULL]++; - num_tagged[BKE_idcode_to_index(GS(id->name))]++; + num_tagged[BKE_idtype_idcode_to_index(GS(id->name))]++; } else { id->tag &= ~LIB_TAG_DOIT; @@ -2233,7 +2233,7 @@ static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEv BLI_dynstr_appendf(dyn_str, "%d %s", num_tagged[i], - TIP_(BKE_idcode_to_name_plural(BKE_idcode_from_index(i)))); + TIP_(BKE_idtype_idcode_to_name_plural(BKE_idtype_idcode_from_index(i)))); } } BLI_dynstr_append(dyn_str, TIP_("). Click here to proceed...")); diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 2787ab5cc52..d89a755f1c6 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -59,7 +59,7 @@ #include "BLT_translation.h" #include "BKE_fcurve.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BKE_layer.h" #include "BKE_lib_id.h" #include "BKE_main.h" @@ -1237,7 +1237,7 @@ static void outliner_add_seq_dup(SpaceOutliner *soops, Sequence *seq, TreeElemen static const char *outliner_idcode_to_plural(short idcode) { - const char *propname = BKE_idcode_to_name_plural(idcode); + const char *propname = BKE_idtype_idcode_to_name_plural(idcode); PropertyRNA *prop = RNA_struct_type_find_property(&RNA_BlendData, propname); return (prop) ? RNA_property_ui_name(prop) : "UNKNOWN"; } -- cgit v1.2.3