UI: View3D Cursor Changes
authorHarley Acheson <harley.acheson@gmail.com>
Fri, 24 Jan 2020 20:17:57 +0000 (12:17 -0800)
committerHarley Acheson <harley.acheson@gmail.com>
Fri, 24 Jan 2020 20:17:57 +0000 (12:17 -0800)
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

release/scripts/addons
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c

index 1e165b809b66fbf19778dbb6f1a3f4e64efef031..71ac0b888beb3f057915446e3e7c92c44f1c4ee8 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1e165b809b66fbf19778dbb6f1a3f4e64efef031
+Subproject commit 71ac0b888beb3f057915446e3e7c92c44f1c4ee8
index c03d681f2b25cbf142a23f51f2a0a3d18a389757..8429d30aeec3eedabc1accc9251c8b284d450763 100644 (file)
@@ -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,
index 7db1a6123e888becaecc4969618a8a79d0aebc7d..59697c00c9cedc52c5c0ed06b79228dde11c333b 100644 (file)
@@ -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);
   }
 }
index 504b10888e8c0bb6dcc4fe46f252209b2e517e4c..c8b85cd98dbf8e38ebdfb8c8f11109ed405b6580 100644 (file)
@@ -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)