From 690ed63eb55d1c52b051d8ce40e76e1b57291f29 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Apr 2019 20:02:09 +0200 Subject: Cleanup: unused region init functions --- source/blender/editors/space_view3d/space_view3d.c | 69 ---------------------- 1 file changed, 69 deletions(-) (limited to 'source/blender/editors/space_view3d/space_view3d.c') diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 85264fe4bbc..a829584b580 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -82,75 +82,6 @@ /* ******************** manage regions ********************* */ -ARegion *view3d_has_buttons_region(ScrArea *sa) -{ - ARegion *ar, *arnew; - - ar = BKE_area_find_region_type(sa, RGN_TYPE_UI); - if (ar) { - return ar; - } - - /* add subdiv level; after header */ - ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); - - /* is error! */ - if (ar == NULL) { - return NULL; - } - - arnew = MEM_callocN(sizeof(ARegion), "buttons for view3d"); - - BLI_insertlinkafter(&sa->regionbase, ar, arnew); - arnew->regiontype = RGN_TYPE_UI; - arnew->alignment = RGN_ALIGN_RIGHT; - - arnew->flag = RGN_FLAG_HIDDEN; - - return arnew; -} - -ARegion *view3d_has_tools_region(ScrArea *sa) -{ - ARegion *ar, *artool = NULL, *arhead; - - for (ar = sa->regionbase.first; ar; ar = ar->next) { - if (ar->regiontype == RGN_TYPE_TOOLS) { - artool = ar; - } - } - - /* tool region hide/unhide also hides props */ - if (artool) { - return artool; - } - - if (artool == NULL) { - /* add subdiv level; after header */ - for (arhead = sa->regionbase.first; arhead; arhead = arhead->next) { - if (arhead->regiontype == RGN_TYPE_HEADER) { - break; - } - } - - /* is error! */ - if (arhead == NULL) { - return NULL; - } - - artool = MEM_callocN(sizeof(ARegion), "tools for view3d"); - - BLI_insertlinkafter(&sa->regionbase, arhead, artool); - artool->regiontype = RGN_TYPE_TOOLS; - artool->alignment = RGN_ALIGN_LEFT; - artool->flag = RGN_FLAG_HIDDEN; - } - - return artool; -} - -/* ****************************************************** */ - /* function to always find a regionview3d context inside 3D window */ RegionView3D *ED_view3d_context_rv3d(bContext *C) { -- cgit v1.2.3