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:
authorTon Roosendaal <ton@blender.org>2012-12-22 17:39:44 +0400
committerTon Roosendaal <ton@blender.org>2012-12-22 17:39:44 +0400
commitc5cb2c8b33c8684754c2054b3ad73a72267b8b2e (patch)
treeb7d29724275b91d7f74f5a86244a476f765e7cfa /source/blender/makesrna/intern/rna_main_api.c
parent6a57420b52317ee484da2cdb0a0f88ff4a231cbc (diff)
From the long todo:
New Outliner mode: "Main Data". This shows a flattened, non-hierarchical list of all linkable "ID" data in your current project. It works fine on searches. Actually this is the view on the "Main" database in Blender, the one that's saved in a .blend. This is in general more useful than the "Datablocks" viewer, which is not searchable, and shows every property of data as well.
Diffstat (limited to 'source/blender/makesrna/intern/rna_main_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index cc74fce1733..fac330fc243 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -198,6 +198,15 @@ 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;