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:
authorCampbell Barton <ideasman42@gmail.com>2018-04-25 08:52:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-25 08:55:50 +0300
commitb00d971efe67799042577cf0391bb34e9f870835 (patch)
tree256b9796c0090c5ff2340bbe3b02d4b32ca65b12 /source/blender/editors/space_view3d/space_view3d.c
parente944e215bf300cd1cea8698391679df1e3802a92 (diff)
UI: Apply remove redo region
This was a disabled part of the top-bar merge (code by @Severin) The only change made is to move to redo UI into a popover.
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c74
1 files changed, 1 insertions, 73 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index e8de9b80fb3..b4d6d554e4f 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -114,26 +114,14 @@ ARegion *view3d_has_buttons_region(ScrArea *sa)
ARegion *view3d_has_tools_region(ScrArea *sa)
{
ARegion *ar, *artool = NULL, *arhead;
-#ifndef WITH_REDO_REGION_REMOVAL
- ARegion *arprops = NULL;
-#endif
for (ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_TOOLS)
artool = ar;
-#ifndef WITH_REDO_REGION_REMOVAL
- if (ar->regiontype == RGN_TYPE_TOOL_PROPS)
- arprops = ar;
-#endif
}
/* tool region hide/unhide also hides props */
- if (artool
-#ifndef WITH_REDO_REGION_REMOVAL
- && arprops
-#endif
- )
- {
+ if (artool) {
return artool;
}
@@ -154,17 +142,6 @@ ARegion *view3d_has_tools_region(ScrArea *sa)
artool->flag = RGN_FLAG_HIDDEN;
}
-#ifndef WITH_REDO_REGION_REMOVAL
- if (arprops == NULL) {
- /* add extra subdivided region for tool properties */
- arprops = MEM_callocN(sizeof(ARegion), "tool props for view3d");
-
- BLI_insertlinkafter(&sa->regionbase, artool, arprops);
- arprops->regiontype = RGN_TYPE_TOOL_PROPS;
- arprops->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
- }
-#endif
-
return artool;
}
@@ -382,16 +359,6 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
ar->alignment = RGN_ALIGN_LEFT;
ar->flag = RGN_FLAG_HIDDEN;
-#ifndef WITH_REDO_REGION_REMOVAL
- /* tool properties */
- ar = MEM_callocN(sizeof(ARegion), "tool properties for view3d");
-
- BLI_addtail(&v3d->regionbase, ar);
- ar->regiontype = RGN_TYPE_TOOL_PROPS;
- ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
- ar->flag = RGN_FLAG_HIDDEN;
-#endif
-
/* buttons/list view */
ar = MEM_callocN(sizeof(ARegion), "buttons for view3d");
@@ -1326,29 +1293,6 @@ static void view3d_tools_region_draw(const bContext *C, ARegion *ar)
ED_region_panels(C, ar, CTX_data_mode_string(C), -1, true);
}
-#ifndef WITH_REDO_REGION_REMOVAL
-static void view3d_props_region_listener(
- bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar,
- wmNotifier *wmn, const Scene *UNUSED(scene))
-{
- /* context changes */
- switch (wmn->category) {
- case NC_WM:
- if (wmn->data == ND_HISTORY)
- ED_region_tag_redraw(ar);
- break;
- case NC_SCENE:
- if (wmn->data == ND_MODE)
- ED_region_tag_redraw(ar);
- break;
- case NC_SPACE:
- if (wmn->data == ND_SPACE_VIEW3D)
- ED_region_tag_redraw(ar);
- break;
- }
-}
-#endif
-
/* area (not region) level listener */
static void space_view3d_listener(
bScreen *UNUSED(sc), ScrArea *sa, struct wmNotifier *wmn, Scene *UNUSED(scene),
@@ -1539,21 +1483,6 @@ void ED_spacetype_view3d(void)
view3d_toolshelf_register(art);
#endif
-#ifndef WITH_REDO_REGION_REMOVAL
- /* regions: tool properties */
- art = MEM_callocN(sizeof(ARegionType), "spacetype view3d tool properties region");
- art->regionid = RGN_TYPE_TOOL_PROPS;
- art->prefsizex = 0;
- art->prefsizey = 120;
- art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
- art->listener = view3d_props_region_listener;
- art->init = view3d_tools_region_init;
- art->draw = view3d_tools_region_draw;
- BLI_addhead(&st->regiontypes, art);
-
- view3d_tool_props_register(art);
-#endif
-
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype view3d header region");
art->regionid = RGN_TYPE_HEADER;
@@ -1566,4 +1495,3 @@ void ED_spacetype_view3d(void)
BKE_spacetype_register(st);
}
-