[Bf-blender-cvs] [52a475287d7] master: Fix T70898: Area.type access fails for topbar & statusbar
Campbell Barton
noreply at git.blender.org
Tue Feb 18 00:38:46 CET 2020
Commit: 52a475287d7bd3b39135ff76e578a4d139ceb683
Author: Campbell Barton
Date: Tue Feb 18 10:23:53 2020 +1100
Branches: master
https://developer.blender.org/rB52a475287d7bd3b39135ff76e578a4d139ceb683
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.
===================================================================
M source/blender/makesrna/intern/rna_screen.c
===================================================================
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)
More information about the Bf-blender-cvs
mailing list