Join GitHub today
Horizontal timeline option in Xsheet (issue#503) #1019
This feature adds a "toggle orientation" button to the Xsheet, letting you switch between default Xsheet layout (with vertical timeline) and compact horizontal timeline:
I've tested as many features as I could, though I'm no veteran in OpenToonz. I've got the basics of selecting, resizing, moving of columns and cells covered. I could not reproduce several more obscure column types; these will behave correctly in old layout and will need tweaks for the new orientation.
OpenToonz code is strongly tied to vertical timeline; it maps X to column number and Y to row number. The link is pervasive in the code. In order to untie them, I introduced several concepts:
Orientation operates on slightly higher level abstractions than the old code. Wherever possible, I used QRects to mark rectangular areas with meaningful role.
Orientation provides quite a few enumerated QRects, QLines, ints and QPainterPaths to satisfy any needs in marking up the screen. These can be retrieved via methods similar to Orientation::rect ():
These are almost always relative to the top left corner of corresponding cell. These primitives are used for both displaying the items and responding to mouse events:
which, among other things, reduces chances for inconsistencies.
@turtletooth The programmer had to lay out. Here you can look it up. If you do not find it then let me tell the programmer to send the information. https://github.com/jaros3/opentoonz/tree/feature/timeline-func
I forgot that I had to force the official OT releases in the normal installation folder to use GPU in order to run decently on my system. For testing purposes, I was running right out of the Release/RelWithDebInfo folders after building which wasn't set up to use GPU and therefore ran badly.
After setting the builds in my dev environments to use GPU, I see no issue with performance.
@manongjohn Thank you for all your work with this. You are awesome!
I am playing with getting text levels working again in OpenToonz. (They started out only for Magpie Pro files, but I am working at expanding their functionality.)
Could you load this scene and see how it looks in the horizontal timeline?
@turtletooth I saw there was a column type of "SoundText" that appeared to be sourced from Magpie files. I didn't have one to test and I couldn't make one so I gave up on it. It was the only column type I couldn't check/test. I had hoped the layout was going to be ok as is. Apparently, it isn't.
After loading your sample file, the column header in both vertical and horizontal layouts need a lot of work. It seems the layout is still from Toonz Harmony? I'm guessing the SoundText layout was never updated to be in line with the other columns in OpenToonz. I also have to fix how it loads into the cell area in horizontal mode.
Now that I have an example of one, I will work on fixing it to match the rest of OpenToonz. :)
@2dvision while you are waiting for additional camera/timeline functionality, the camera can also be animated directly in the viewer using the edit tool.
Select the camera, choose the mode (position, scale or etc.), make adjustments/edits as desired
This feature is now included into our builds ^__^ - https://morevnaproject.org/2017/07/17/horizontal-timeline-now-available-opentoonz/
@morevnaproject I just submitted a commit to this PR. If you can, you might want to pull the latest as it includes some Timeline SoundText columns and tool tips fixes that needed to be made. I've also added a preference setting to show/hide Column number in Timeline mode as well as Ctrl-Click of buttons in Xsheet mode will do a Toggle All of that button.
@shun-iwasawa I've decided to freeze the code for this PR pending any major bugs found or additional changes you might require of it. I do not plan on modifying this PR any more beyond that. The latest commit does not include the UI changes we've been discussing. I will do that as a separate PR since I don't know when that will ever be finalized.
Having said that, please review when you have time. Hopefully it can be merged sometime soon.
Once this is merged my plans are as follows: