From 6be7a98906b769c1496127552b524124a0e70c5a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 Oct 2018 15:05:07 +1100 Subject: PyAPI: raise error when toolbar panels use tabs Add-ons that register panels in the toolbar can no longer use 'bl_categories' (tabs). --- source/blender/editors/screen/area.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/screen/area.c') diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 5faa35729c4..b914dd5ecae 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2076,7 +2076,7 @@ void ED_region_panels_layout_ex( int scroll; /* XXX, should use some better check? */ - bool use_category_tabs = (ELEM(ar->regiontype, RGN_TYPE_TOOLS, RGN_TYPE_UI)); + bool use_category_tabs = (1 << ar->regiontype) & RGN_TYPE_HAS_CATEGORY_MASK; /* offset panels for small vertical tab area */ const char *category = NULL; const int category_tabs_width = UI_PANEL_CATEGORY_MARGIN_WIDTH; -- cgit v1.2.3