diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-18 02:23:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-18 02:34:45 +0300 |
commit | 52a475287d7bd3b39135ff76e578a4d139ceb683 (patch) | |
tree | 3da2f4bcf485bd83ec35c8882c09a725d4b86ae3 /source/blender | |
parent | f5740ec8cfc097c4cdf213e0295892094cd6c80c (diff) |
Fix T70898: Area.type access fails for topbar & statusbar
Revert change from 5f6c45498c92b91a710a1317f6d41f73fbe83477
Excluding enum items meant Python scripts couldn't access them.
This is no longer needed now Area.ui_type is used for the menu.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 1637f8cfed5..b0304b742df 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -109,21 +109,9 @@ static const EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PropertyRNA *UNUSED(prop), bool *r_free) { - EnumPropertyItem *item = NULL; - int totitem = 0; - /* +1 to skip SPACE_EMPTY */ - for (const EnumPropertyItem *item_from = rna_enum_space_type_items + 1; item_from->identifier; - item_from++) { - if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR)) { - continue; - } - RNA_enum_item_add(&item, &totitem, item_from); - } - RNA_enum_item_end(&item, &totitem); - *r_free = true; - - return item; + *r_free = false; + return rna_enum_space_type_items + 1; } static int rna_Area_type_get(PointerRNA *ptr) |