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:
Submodule release/scripts/addons updated: 1e165b809b...71ac0b888b
@@ -134,6 +134,7 @@ 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",
|
||||||
@@ -361,6 +362,7 @@ 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,
|
||||||
)
|
)
|
||||||
@@ -385,6 +387,7 @@ 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,
|
||||||
|
@@ -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)
|
static void view3d_main_region_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
|
||||||
{
|
{
|
||||||
if (WM_cursor_set_from_tool(win, sa, 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 {
|
|
||||||
WM_cursor_set(win, WM_CURSOR_DEFAULT);
|
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)
|
static int gizmo_axis_cursor_get(wmGizmo *gz)
|
||||||
{
|
{
|
||||||
if (gz->highlight_part > 0) {
|
return WM_CURSOR_DEFAULT;
|
||||||
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