diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-10-18 20:15:06 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-10-18 20:31:00 +0300 |
commit | 69b4c9f6e5ea3ececde73ba8d6199e6ce797d956 (patch) | |
tree | 08c11598948db7289d02b666e22a9ba8391784fa /source/blender/editors/screen | |
parent | c470620c169953e5c45ce3221d7f3dc3638814b9 (diff) | |
parent | 32145c4a88f9b4947e22e51b9f17459fe6eacd79 (diff) |
Merge branch 'blender2.8' into topbar
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 4 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 12 | ||||
-rw-r--r-- | source/blender/editors/screen/workspace_edit.c | 14 |
5 files changed, 20 insertions, 16 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 08be062aaf6..20af9ee215e 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -145,11 +145,11 @@ void ED_region_do_listen(bScreen *sc, ScrArea *sa, ARegion *ar, wmNotifier *note } /* only exported for WM */ -void ED_area_do_listen(bScreen *sc, ScrArea *sa, wmNotifier *note, const Scene *scene) +void ED_area_do_listen(bScreen *sc, ScrArea *sa, wmNotifier *note, Scene *scene, WorkSpace *workspace) { /* no generic notes? */ if (sa->type && sa->type->listener) { - sa->type->listener(sc, sa, note, scene); + sa->type->listener(sc, sa, note, scene, workspace); } } diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 5813f317295..b8575b2da2a 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -89,7 +89,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult ScrArea *sa = CTX_wm_area(C); Scene *scene = WM_window_get_active_scene(win); WorkSpace *workspace = BKE_workspace_active_get(win->workspace_hook); - SceneLayer *sl = BKE_scene_layer_from_workspace_get(workspace); + SceneLayer *sl = BKE_scene_layer_from_workspace_get(scene, workspace); Object *obedit = scene->obedit; Object *obact = sl->basact ? sl->basact->object : NULL; diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index df2619c9ea3..6544d42f6a8 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -957,7 +957,7 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen) /* *********************************** */ /* case when on area-edge or in azones, or outside window */ -static void screen_cursor_set(wmWindow *win, wmEvent *event) +static void screen_cursor_set(wmWindow *win, const wmEvent *event) { const bScreen *screen = WM_window_get_active_screen(win); const int screen_size_x = WM_window_screen_pixels_x(win); @@ -997,7 +997,7 @@ static void screen_cursor_set(wmWindow *win, wmEvent *event) /* called in wm_event_system.c. sets state vars in screen, cursors */ /* event type is mouse move */ -void ED_screen_set_subwinactive(bContext *C, wmEvent *event) +void ED_screen_set_subwinactive(bContext *C, const wmEvent *event) { wmWindow *win = CTX_wm_window(C); bScreen *scr = WM_window_get_active_screen(win); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index dd609d8e2ac..9a3d1da2375 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1788,7 +1788,7 @@ static int area_split_modal(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static EnumPropertyItem prop_direction_items[] = { +static const EnumPropertyItem prop_direction_items[] = { {'h', "HORIZONTAL", 0, "Horizontal", ""}, {'v', "VERTICAL", 0, "Vertical", ""}, {0, NULL, 0, NULL, NULL} @@ -3806,9 +3806,9 @@ static void SCREEN_OT_border_select(wmOperatorType *ot) /* api callbacks */ ot->exec = border_select_exec; - ot->invoke = WM_border_select_invoke; - ot->modal = WM_border_select_modal; - ot->cancel = WM_border_select_cancel; + ot->invoke = WM_gesture_border_invoke; + ot->modal = WM_gesture_border_modal; + ot->cancel = WM_gesture_border_cancel; ot->poll = ED_operator_areaactive; @@ -4083,7 +4083,7 @@ enum { SPACE_CONTEXT_CYCLE_NEXT, }; -static EnumPropertyItem space_context_cycle_direction[] = { +static const EnumPropertyItem space_context_cycle_direction[] = { {SPACE_CONTEXT_CYCLE_PREV, "PREV", 0, "Previous", ""}, {SPACE_CONTEXT_CYCLE_NEXT, "NEXT", 0, "Next", ""}, {0, NULL, 0, NULL, NULL} @@ -4222,7 +4222,7 @@ void ED_operatortypes_screen(void) static void keymap_modal_set(wmKeyConfig *keyconf) { - static EnumPropertyItem modal_items[] = { + static const EnumPropertyItem modal_items[] = { {KM_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, {KM_MODAL_APPLY, "APPLY", 0, "Apply", ""}, {KM_MODAL_STEP10, "STEP10", 0, "Steps on", ""}, diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c index 312117f2bbe..2229ecce408 100644 --- a/source/blender/editors/screen/workspace_edit.c +++ b/source/blender/editors/screen/workspace_edit.c @@ -38,6 +38,7 @@ #include "BKE_main.h" #include "BKE_library.h" #include "BKE_report.h" +#include "BKE_scene.h" #include "BKE_screen.h" #include "BKE_workspace.h" @@ -51,6 +52,8 @@ #include "ED_object.h" #include "ED_screen.h" +#include "MEM_guardedalloc.h" + #include "RNA_access.h" #include "UI_interface.h" @@ -68,7 +71,7 @@ * \{ */ WorkSpace *ED_workspace_add( - Main *bmain, const char *name, SceneLayer *act_render_layer) + Main *bmain, const char *name, SceneLayer *act_render_layer, ViewRender *view_render) { WorkSpace *workspace = BKE_workspace_add(bmain, name); @@ -77,6 +80,7 @@ WorkSpace *ED_workspace_add( #endif BKE_workspace_render_layer_set(workspace, act_render_layer); + BKE_viewrender_copy(&workspace->view_render, view_render); return workspace; } @@ -90,8 +94,8 @@ static void workspace_change_update_mode( const WorkSpace *workspace_old, const WorkSpace *workspace_new, bContext *C, Object *ob_act, ReportList *reports) { - ObjectMode mode_old = BKE_workspace_object_mode_get(workspace_old); - ObjectMode mode_new = BKE_workspace_object_mode_get(workspace_new); + eObjectMode mode_old = BKE_workspace_object_mode_get(workspace_old); + eObjectMode mode_new = BKE_workspace_object_mode_get(workspace_new); if (mode_old != mode_new) { ED_object_mode_compat_set(C, ob_act, mode_new, reports); @@ -215,7 +219,8 @@ WorkSpace *ED_workspace_duplicate( ListBase *layouts_old = BKE_workspace_layouts_get(workspace_old); WorkSpace *workspace_new = ED_workspace_add( bmain, workspace_old->id.name + 2, - BKE_workspace_render_layer_get(workspace_old)); + BKE_workspace_render_layer_get(workspace_old), + &workspace_old->view_render); ListBase *transform_orientations_old = BKE_workspace_transform_orientations_get(workspace_old); ListBase *transform_orientations_new = BKE_workspace_transform_orientations_get(workspace_new); @@ -231,7 +236,6 @@ WorkSpace *ED_workspace_duplicate( win->workspace_hook->temp_layout_store = layout_new; } } - return workspace_new; } |