Animation: Turn play/stop into play/pause button. Add separate button for stop
AbandonedPublic

Authored by scottpetrovic on Jul 30 2018, 6:11 PM.

Details

Reviewers
rempt
dkazakov
Group Reviewers
Krita
Summary

This just updates the play/stop button to use a more normal play/pause. The stop button has been added as a separate button to the right.

I saw this comment on reddit about this feature. I also talked with Bollebib and he agreed it would be useful.

Test Plan

Tested playing and pausing. Pause stopped on the current frame. Pressing play again resumes where it left off.

Pressing stop at various time brings the playhead back to the start frame.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
scottpetrovic created this revision.Jul 30 2018, 6:11 PM
Restricted Application added a project: Krita. · View Herald TranscriptJul 30 2018, 6:11 PM
scottpetrovic requested review of this revision.Jul 30 2018, 6:11 PM
rempt accepted this revision.Aug 6 2018, 8:37 AM
rempt added a subscriber: rempt.

Looks fine to me.

This revision is now accepted and ready to land.Aug 6 2018, 8:37 AM
dkazakov requested changes to this revision.Aug 6 2018, 10:14 AM
dkazakov added a subscriber: dkazakov.

Hi, @scottpetrovic!

I guess there is a small problem with the implementation of the stop button

  1. Select some frame range on the timeline (e.g. frames from 10 till 20)
  2. Press Play button
  3. Press Pause button to stop the cursor in a random position of the timeline
  4. Press Stop button

Expected behavior:

  • the timeline cursor goes to the leftmost side of the selection, selection is unchanged

Actual behavior:

  • the timeline cursor jumps correctly, but the selected range is reset
This revision now requires changes to proceed.Aug 6 2018, 10:14 AM

I made some changes after testing it more with a playback range. The UX is a bit trickier with having a selection as there are more states to deal with with.

@dkazakov I fixed your use case with pressing pause, then stop removed the selection. There is some weird bug why the start playback function removes the selection, so the end() position seems to be how it works currently in code -- so I just used that

dkazakov requested changes to this revision.Aug 13 2018, 7:27 AM

Hi, @scottpetrovic!

Now the button works exactly like it used to work without your patch, that is, it resets to the frame at the start of the playback. Sometimes the cursor even jumps somewhere when one presses play button :(

I would expect the feature work like that:

  1. When "Pause" button is pressed, the playback stops (that is stops using the cached overlay) and the currently active image frame is switched to the currently visible cached frame (initially the start frame is activated and it doesn't change during the playback).
  2. When "Stop" button is pressed, the playback stops, but no switch happens (initial frame is just kept active)
  3. The thing works a bit differently when no openGL is enabled.

Speaking truly, I'm not entirely sure if the animators really want exactly a Play/Pause button. In their workflow, they usually need to see the same sequence multiple times, so that resetting the cursor to the initial frame seem quite natural. I have a feeling that having two buttons Play/Stop and Pause/Resume would be a bit more convenient for them, but i'm not entirely sure about the details, what happens if the user switches frames in a paused state.

There is also a quite old feature request, that is quite related to that: "Play around" button. This button should play a range [-1; +5] seconds around the current point. We should also take into account that this feature will be implemented one day.

This revision now requires changes to proceed.Aug 13 2018, 7:27 AM
scottpetrovic abandoned this revision.Jan 7 2019, 9:15 PM

closing this. I am not really working on it and it probably needs more discussion