UI: View3D Cursor Changes
Changes the default View3D mouse cursor to the OS-supplied arrow pointer. Subsequent cursor changes will now be set per-tool instead. Differential Revision: https://developer.blender.org/D6485 Reviewed by Campbell Barton
This commit is contained in:
parent
79d9874028
commit
4aa703aa14
Notes:
blender-bot
2023-02-14 04:31:04 +01:00
Referenced by commit 219ce574b5
, Revert "UI: View3D Cursor Changes"
Referenced by issue #73457, Mouse cursor doesnt change while in edit mode
|
@ -1 +1 @@
|
|||
Subproject commit 1e165b809b66fbf19778dbb6f1a3f4e64efef031
|
||||
Subproject commit 71ac0b888beb3f057915446e3e7c92c44f1c4ee8
|
|
@ -134,6 +134,7 @@ 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",
|
||||
|
@ -361,6 +362,7 @@ 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,
|
||||
)
|
||||
|
@ -385,6 +387,7 @@ 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,
|
||||
|
|
|
@ -1027,19 +1027,9 @@ 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 *sa, ARegion *ar)
|
||||
{
|
||||
if (WM_cursor_set_from_tool(win, sa, ar)) {
|
||||
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 {
|
||||
if (!WM_cursor_set_from_tool(win, sa, ar)) {
|
||||
WM_cursor_set(win, WM_CURSOR_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -517,10 +517,7 @@ static int gizmo_axis_test_select(bContext *UNUSED(C), wmGizmo *gz, const int mv
|
|||
|
||||
static int gizmo_axis_cursor_get(wmGizmo *gz)
|
||||
{
|
||||
if (gz->highlight_part > 0) {
|
||||
return WM_CURSOR_EDIT;
|
||||
}
|
||||
return WM_CURSOR_NSEW_SCROLL;
|
||||
return WM_CURSOR_DEFAULT;
|
||||
}
|
||||
|
||||
void VIEW3D_GT_navigate_rotate(wmGizmoType *gzt)
|
||||
|
|
Loading…
Reference in New Issue