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:
@@ -137,7 +137,6 @@ class _defs_view3d_generic:
|
|||||||
idname="builtin.measure",
|
idname="builtin.measure",
|
||||||
label="Measure",
|
label="Measure",
|
||||||
description=description,
|
description=description,
|
||||||
cursor='CROSSHAIR',
|
|
||||||
icon="ops.view3d.ruler",
|
icon="ops.view3d.ruler",
|
||||||
widget="VIEW3D_GGT_ruler",
|
widget="VIEW3D_GGT_ruler",
|
||||||
keymap="3D View Tool: Measure",
|
keymap="3D View Tool: Measure",
|
||||||
@@ -375,7 +374,6 @@ class _defs_view3d_select:
|
|||||||
label="Select Lasso",
|
label="Select Lasso",
|
||||||
icon="ops.generic.select_lasso",
|
icon="ops.generic.select_lasso",
|
||||||
widget=None,
|
widget=None,
|
||||||
cursor='DEFAULT',
|
|
||||||
keymap="3D View Tool: Select Lasso",
|
keymap="3D View Tool: Select Lasso",
|
||||||
draw_settings=draw_settings,
|
draw_settings=draw_settings,
|
||||||
)
|
)
|
||||||
@@ -400,7 +398,6 @@ class _defs_view3d_select:
|
|||||||
label="Select Circle",
|
label="Select Circle",
|
||||||
icon="ops.generic.select_circle",
|
icon="ops.generic.select_circle",
|
||||||
widget=None,
|
widget=None,
|
||||||
cursor='DEFAULT',
|
|
||||||
keymap="3D View Tool: Select Circle",
|
keymap="3D View Tool: Select Circle",
|
||||||
draw_settings=draw_settings,
|
draw_settings=draw_settings,
|
||||||
draw_cursor=draw_cursor,
|
draw_cursor=draw_cursor,
|
||||||
|
@@ -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)
|
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);
|
WM_cursor_set(win, WM_CURSOR_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -536,9 +536,12 @@ static int gizmo_axis_test_select(bContext *UNUSED(C), wmGizmo *gz, const int mv
|
|||||||
return -1;
|
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)
|
void VIEW3D_GT_navigate_rotate(wmGizmoType *gzt)
|
||||||
|
Reference in New Issue
Block a user