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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-22 18:04:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-22 18:04:09 +0400
commitdf6b0af04a8fa43388403190497607484aa29885 (patch)
tree64522a03edd57de6b2c57b08a5dc7a00144d3c42 /source
parent634be5992d8f3b76b510ff7cf19a1b43a18d1a21 (diff)
replace RNA_ID_type_name() with BKE_idcode_to_name_plural()
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c6
-rw-r--r--source/blender/makesrna/RNA_access.h2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c9
3 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index ca2168020cd..12f79ec999d 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -69,6 +69,7 @@
#include "BKE_library.h"
#include "BKE_modifier.h"
#include "BKE_sequencer.h"
+#include "BKE_idcode.h"
#include "ED_armature.h"
#include "ED_screen.h"
@@ -1598,7 +1599,10 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
ten = outliner_add_element(soops, &soops->tree, (void *)lbarray[a], NULL, TSE_ID_BASE, 0);
ten->directdata = lbarray[a];
- ten->name = (char *)RNA_ID_type_name(GS(id->name));
+ ten->name = (char *)BKE_idcode_to_name_plural(GS(id->name));
+ if (UNLIKELY(ten->name == NULL)) {
+ ten->name = "UNKNOWN";
+ }
for (; id; id = id->next) {
outliner_add_element(soops, &ten->subtree, id, ten, 0, 0);
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index d7dad1757f0..5f4e4ce4259 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -1039,8 +1039,6 @@ int RNA_function_call_direct_va_lookup(struct bContext *C, struct ReportList *re
short RNA_type_to_ID_code(StructRNA *type);
StructRNA *ID_code_to_RNA_type(short idcode);
-const char *RNA_ID_type_name(short type);
-
#define RNA_POINTER_INVALIDATE(ptr) { \
/* this is checked for validity */ \
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index fac330fc243..cc74fce1733 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -198,15 +198,6 @@ static Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, co
return ob;
}
-/* exported for non-rna use cases */
-const char *RNA_ID_type_name(short type)
-{
- const char *idname;
- if (RNA_enum_id_from_value(id_type_items, type, &idname) == 0)
- idname = "UNKNOWN";
- return idname;
-}
-
static void rna_Main_objects_remove(Main *bmain, ReportList *reports, PointerRNA *object_ptr)
{
Object *object = object_ptr->data;