pencil2d / pencil

Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
http://pencil2d.org
GNU General Public License v2.0
1.47k stars 273 forks source link

Undoing a stroke with "keep drawing on previous key-frame" leads to weird behaviour #1576

Closed Nel-Fie closed 3 years ago

Nel-Fie commented 3 years ago

Issue Summary

This happens if "Preferences->Timeline->Drawing" is set to "Keep drawing on the previous keyframe". On a bitmap layer, if you draw a stroke while the timeline is not on a keyed frame, and then undo it, several odd things happen:

Actual Results

1) A keyframe is generated at the current position in the timeline. 2) The new keyframe is a duplicate of the previous keyframe, but with the stroke undone 3) The previous keyframe retains the stroke that was meant to be undone

It might have other consequences with other tools and layer types, I haven't tried.

Expected Results

1) A new keyframe should not be created. 2) N/A 3) The stroke should be undone on the previous keyframe.

Steps to reproduce

The above should be self-explanatory. If not, let me know and I'll provide a step-by-step.

System Information

J5lx commented 3 years ago

Hi Nelfie, thanks for reporting. That description sounds like a bug we fixed in version 0.6.6, which was released just a few days ago. Please give the new version a try (you can get it on our downloads page) and let us know whether you still have this issue in that version.

Nel-Fie commented 3 years ago

Hi Nelfie, thanks for reporting. That description sounds like a bug we fixed in version 0.6.6, which was released just a few days ago. Please give the new version a try (you can get it on our downloads page) and let us know whether you still have this issue in that version.

Hi J5lx, thank you very much for the swift reply. You are indeed correct, that was the bug! I thought I had the most recent version of Pencil2D ("Check for updates" said I was up-to-date, just yesterday), but apparently not. But the issue is fixed in 0.6.6, as far as I can tell!

However, I'm noticing a new problem, still with "Preferences->Timeline->Drawing" set to "Keep drawing on the previous keyframe": When I draw on a non-keyed frame, the strokes disappear as soon as they are drawn. It's only when I set the timeline to the previous keyframe, and perform an action (e.g. brushing or erasing), that all of what I had drawn appears. Sort of as if Pencil2D didn't update the preview of the canvas correctly. Is this a known issue? It might be due to my system being pretty old, however.

J5lx commented 3 years ago

Don’t worry about the version. 0.6.5 has an extremely unfortunate issue where the update checker broke post-release due to server changes… Anyway, great to hear the undo bug is indeed gone!

The other problem you describe doesn’t sound like a known issue to me, but it does remind me of some very similar recent issues. You should be able to work around it simply by zooming the canvas a little, even without changing the position on the timeline.

@CandyFace can you take a look at that problem and see if it’s related to the caching issues you’ve been working on?

MrStevns commented 3 years ago

The stroke disappearing issue is indeed a bug related to the recent cache rework, it should be fixed in #1577

Nel-Fie commented 3 years ago

@J5lx I can confirm zooming works too, the canvas does indeed update by doing that. Since the initial bug was already fixed, and this one is in the works as well, it seems everything is under control. Thank you for the help and good luck!