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 4aa703aa14.
This commit is contained in:
Dalai Felinto 2020-05-25 11:53:02 +02:00
parent ec0ba8e3b5
commit 219ce574b5
3 changed files with 16 additions and 6 deletions

View File

@ -137,7 +137,6 @@ class _defs_view3d_generic:
idname="builtin.measure",
label="Measure",
description=description,
cursor='CROSSHAIR',
icon="ops.view3d.ruler",
widget="VIEW3D_GGT_ruler",
keymap="3D View Tool: Measure",
@ -375,7 +374,6 @@ class _defs_view3d_select:
label="Select Lasso",
icon="ops.generic.select_lasso",
widget=None,
cursor='DEFAULT',
keymap="3D View Tool: Select Lasso",
draw_settings=draw_settings,
)
@ -400,7 +398,6 @@ class _defs_view3d_select:
label="Select Circle",
icon="ops.generic.select_circle",
widget=None,
cursor='DEFAULT',
keymap="3D View Tool: Select Circle",
draw_settings=draw_settings,
draw_cursor=draw_cursor,

View File

@ -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);
}
}

View File

@ -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)