Page MenuHome

2D cursor moves unintendedly when changing frames in Graph editor
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.87

Blender Version
Broken: version: 2.83 (sub 15), branch: master, commit date: 2020-05-08 14:49, hash: rBce76e17584ee

Short description of error
When scrubbing frames in the graph editor, the 2D cursor moves to the top of the editor, making it impossible to change the playhead without the cursor's value (i.e. Y-coordinate)

Exact steps for others to reproduce the error

  • Using factory defaults
  • Go to the graph editor
  • Shift+Right Click in the middle of the editor to set the 2D cursor somewhere in the middle.
  • Move the playhead of the timeline to scrub
  • See that the horizontal line is no longer visible; it is moved to underneath the playhead.

Expected behaviour: moving the playhead should only change the current frame, and not the cursor value.

Related Objects

Event Timeline

Sybren A. Stüvel (sybren) changed the task status from Needs Triage to Confirmed.Mon, May 11, 11:22 AM
Sybren A. Stüvel (sybren) updated the task description. (Show Details)
Sybren A. Stüvel (sybren) changed the subtype of this task from "Report" to "Bug".
Sybren A. Stüvel (sybren) moved this task from Backlog to Bugs on the Animation & Rigging board.

This can be easily fixed by letting the frame change operator run in the scrubbing region, as opposed to the graph-cursor one. That's easy to do:

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 2e83f3c86c6..6e6f11eebfc 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -1391,7 +1391,6 @@ def km_time_scrub(_params):
 
     items.extend([
         ("anim.change_frame", {"type": "LEFTMOUSE", "value": 'PRESS'}, None),
-        ("graph.cursor_set", {"type": "LEFTMOUSE", "value": 'PRESS'}, None),
     ])
 
     return keymap
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 2db381dfc69..40cd368e02b 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -73,15 +73,9 @@ static bool change_frame_poll(bContext *C)
    * this shouldn't show up in 3D editor (or others without 2D timeline view) via search
    */
   if (area) {
-    if (ELEM(area->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
+    if (ELEM(area->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_SEQ, SPACE_CLIP, SPACE_GRAPH)) {
       return true;
     }
-    else if (area->spacetype == SPACE_GRAPH) {
-      /* NOTE: Graph Editor has special version which does some extra stuff.
-       * No need to show the generic error message for that case though!
-       */
-      return false;
-    }
   }
 
   CTX_wm_operator_poll_msg_set(C, "Expected an animation area to be active");

Which gives this behavior:

Sybren seems to be fine with this, @Luciano Muñoz Sessarego (looch) if you agree too, I'm going to commit.

Yes please, looks exactly like what i was expecting ! :)
Gorgeous work guys!