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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_screen.c')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c50
1 files changed, 5 insertions, 45 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 15fe399f608..f9171887bfb 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -105,56 +105,16 @@ static int rna_Screen_fullscreen_get(PointerRNA *ptr)
return (sc->full != 0);
}
-
-/* Returns an UI-compatible list */
-/* Note: Should not be needed, but for now we need to keep EMPTY at least in the static version of this enum, so... */
+/* UI compatible list: should not be needed, but for now we need to keep EMPTY
+ * at least in the static version of this enum for python scripts. */
static EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), int *free)
{
- EnumPropertyItem *item = NULL;
- EnumPropertyItem sep = {0, "", ICON_NONE, NULL, NULL};
- int totitem = 0;
-
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_VIEW3D);
-
- RNA_enum_item_add(&item, &totitem, &sep);
-
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_TIME);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_IPO);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_ACTION);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_NLA);
-
- RNA_enum_item_add(&item, &totitem, &sep);
-
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_IMAGE);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_SEQ);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_CLIP);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_TEXT);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_NODE);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_LOGIC);
-
- RNA_enum_item_add(&item, &totitem, &sep);
-
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_BUTS);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_OUTLINER);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_USERPREF);
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_INFO);
-
- RNA_enum_item_add(&item, &totitem, &sep);
-
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_FILE);
-
- RNA_enum_item_add(&item, &totitem, &sep);
-
- RNA_enum_items_add_value(&item, &totitem, space_type_items, SPACE_CONSOLE);
-
- RNA_enum_item_end(&item, &totitem);
- *free = 1;
-
- return item;
+ /* +1 to skip SPACE_EMPTY */
+ *free = 0;
+ return space_type_items + 1;
}
-
static void rna_Area_type_set(PointerRNA *ptr, int value)
{
ScrArea *sa = (ScrArea *)ptr->data;