diff options
author | Dalai Felinto <dalai@blender.org> | 2020-05-25 12:53:02 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2020-05-25 17:28:55 +0300 |
commit | 219ce574b56585eb5db056983a8acf08f7ff9991 (patch) | |
tree | f111e5c25c90e359384103537ff5e80c8ec35d02 /source/blender | |
parent | ec0ba8e3b5ee2d5f5ef9239641db6550bf5b77b7 (diff) |
Revert "UI: View3D Cursor Changes"
This change is yet to be followed by a more comprehensive design
proposal including:
* How to differentiate the modes apart.
* More clear definition of tools and the rules for their components (gizmo, cursor).
* Selection as a non-tool vs drag option.
This can be revisited for 2.90 with more time. For now the UI team
agrees to revert this.
--
This reverts commit 4aa703aa1430bc53f19e2cc7182e70db1a916f13.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c | 7 |
2 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index a5c99016434..51607c5daa3 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -1082,9 +1082,19 @@ static void view3d_main_region_message_subscribe(const struct bContext *C, } } +/* concept is to retrieve cursor type context-less */ static void view3d_main_region_cursor(wmWindow *win, ScrArea *area, ARegion *region) { - if (!WM_cursor_set_from_tool(win, area, region)) { + if (WM_cursor_set_from_tool(win, area, region)) { + return; + } + + ViewLayer *view_layer = WM_window_get_active_view_layer(win); + Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer); + if (obedit) { + WM_cursor_set(win, WM_CURSOR_EDIT); + } + else { WM_cursor_set(win, WM_CURSOR_DEFAULT); } } diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c index 3301e28c90c..3ce4c8dc9a8 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c @@ -536,9 +536,12 @@ static int gizmo_axis_test_select(bContext *UNUSED(C), wmGizmo *gz, const int mv return -1; } -static int gizmo_axis_cursor_get(wmGizmo *UNUSED(gz)) +static int gizmo_axis_cursor_get(wmGizmo *gz) { - return WM_CURSOR_DEFAULT; + if (gz->highlight_part > 0) { + return WM_CURSOR_EDIT; + } + return WM_CURSOR_NSEW_SCROLL; } void VIEW3D_GT_navigate_rotate(wmGizmoType *gzt) |