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.45k stars 272 forks source link

Auto extend is not triggered by sound frames. #919

Closed MrStevns closed 4 years ago

MrStevns commented 6 years ago

--Issue Summary--

With the recent commit https://github.com/pencil2d/pencil/commit/4076b91a408f1f05ef4e39727e5d7dfa479af5f4 the timeline extends automatically when adding vector and bitmap frames as the scrollbar is near its end and the frame likewise. This is not the case for sound frames, nothing happens when you create a frames that goes far beyond the timeline length.

--Actual Results--

Nothing is extended when adding sound frames

--Expected Results--

The timeline length should extend to the length of the soundclip + a bit more for visual clarity.

--Steps to reproduce--

  1. move the scroll bar as far as the timeline length
  2. add a bitmap or vector frame near the end.

notice that the bar has moved a bit, repeat for soundclip.

--System Information--

chchwy commented 6 years ago

This is a little bit tricky because we are not able to get the length of sound clip right after loading it. It takes maybe a few milliseconds in the background until we get the signal QMediaPlayer::durationChanged emitted.

MrStevns commented 6 years ago

Then perhaps we could change the behaviour of the auto extend? I'm thinking instead of making it extend only when you add frames near the end of the timeline, it could happen when you move the scrollbar slider closer to the end.

Jose-Moreno commented 4 years ago

@CandyFace Can you confirm if this keeps happening for you? In 0.6.5 at least I imported a sound (tested both sound & movie audio options) and it seems to have extended the timeline. What I did was

1) I reduce the timeline length from default 240 to 60 2) Imported a movie audio with 138 frames worth of length 3) The timeline length was increased to 208 frames (roughly 150% increase in length counting from the sound container last reported frame)

MrStevns commented 4 years ago

I can't reproduce the problem anymore, thanks for reminding me 👍 closing.