Bug 355381 - Applications/15.12.0: transition selection parameters show wrong track
Summary: Applications/15.12.0: transition selection parameters show wrong track
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-15 14:13 UTC by Wegwerf
Modified: 2015-12-14 21:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 15.12.0
Sentry Crash Report:


Attachments
Wrong track index test case Kdenlive 15.12.0 project (10.75 KB, application/x-kdenlive)
2015-11-15 14:14 UTC, Wegwerf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wegwerf 2015-11-15 14:13:02 UTC
The tracks parameter in the UI now uses a different track indexing scheme than that used by MLT. For this reason, selecting the right track according to name actually selects the wrong track. This bug may be related to https://bugs.kde.org/show_bug.cgi?id=355380 and actually may be the real bug behind it.

Reproducible: Always

Steps to Reproduce:
1. Create a new 15.12.0 project with 6 video tracks and 2 audio tracks.
2. Add two color clips to project, such as white and black clips.
3. Throw one color clip onto the topmost video track.
4. Throw the other color clop onto the bottommost video track.
5. Add affine transition to topmost color clip; set its opacity to 50%.
6. Set "track" parameter of transition to bottommost video track "Video 6".

Actual Results:  
The project monitor either shows a black or white image, depending on which color clip is on the topmost video track.

Expected Results:  
The project monitor should show a gray image; the result of an affine transition with 50% opacity between black and white.

Selecting the track "Video 3" for the transition-with instead causes the correct composition to happen. This looks like messed-up indexing between UI and MLT core.
Comment 1 Wegwerf 2015-11-15 14:14:47 UTC
Created attachment 95513 [details]
Wrong track index test case Kdenlive 15.12.0 project
Comment 2 Wegwerf 2015-11-15 14:22:42 UTC
Setting the track-with to "Video 2" also works; this seems to correspond with the index calculation used in MLT, where "timeline" tracks are counted bottom up. In the old Kdenlive track model indexes were top down instead. So it's really now inside-out. ;)
Comment 3 Jean-Baptiste Mardelle 2015-11-15 14:25:57 UTC
I can reproduce the problem, working on it thanks. I rewrote the track logic for 15.12 so that we now always use the MLT numbering in Kdenlive, because previously some parts used an inverted numbering, some not and it was a total mess. But of course the rewrite caused some regressions.

Hopefully it is now easier to fix them. Should be done in a few minutes.
Comment 4 Jean-Baptiste Mardelle 2015-11-15 14:29:49 UTC
Git commit 41fa0029f9fe485ab92fdf263943f8436029de94 by Jean-Baptiste Mardelle.
Committed on 15/11/2015 at 14:27.
Pushed by mardelle into branch 'Applications/15.12'.

Fix transition track parameter broken, should fix this bug

M  +1    -1    src/project/transitionsettings.cpp

http://commits.kde.org/kdenlive/41fa0029f9fe485ab92fdf263943f8436029de94
Comment 5 Wegwerf 2015-11-15 15:30:24 UTC
(In reply to Jean-Baptiste Mardelle from comment #3)
> I can reproduce the problem, working on it thanks. I rewrote the track logic
> for 15.12 so that we now always use the MLT numbering in Kdenlive, because
> previously some parts used an inverted numbering, some not and it was a
> total mess. But of course the rewrite caused some regressions.
> 
> Hopefully it is now easier to fix them. Should be done in a few minutes.

Yeah, this kind of refacturing is necessary work ... and always causes a certain amount of pain on all sides. :)
Comment 6 Wegwerf 2015-11-15 15:34:10 UTC
Did two quick checks on existing projects; this looks fine now. Thank you very much for the quick fix, as this was blocking me from moving to 15.12.0 in my projects. Thanks!