How do I focus the timeline to a layer

Please use this part to report bugs & errors, ask questions & "How to..."
Post Reply
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

How do I focus the timeline to a layer

Post by Lukas »

If I have selected a layer, but scrolled the timeline up or down. Is there a way to get focus back to the layer without adjusting the zoom?
  • Lukas Sketch Panel
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
  • YouTube.com/@ClubBaboo
  • YouTube.com/@FrameOrder
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: How do I focus the timeline to a layer

Post by Svengali »

lukas,

I'm not exactly sure what you are asking but...

there are two George commands that you should look at: tv_WriteUserString and tv_ReadUserString. Very powerful for storing temporary information (like the current Layer) either during or between TVPaint sessions. The information becomes an entry in the current configuration file using "SECTION" "LINE" CONTENT-VARIABLE where you supply a unique word for Section and Line and attach the appropriate variable you want to store (and later retrieve). You can store other info under the SAME Section name but with a DIFFERENT Line name. Be judicious and don't load up the config.ini with too much temporary or abandoned info. One other thing: the current config.ini file exists and is updated only in memory until you quit TVPaint, at which time it is stored to disk and reloaded when you next start TVPaint.

For instance:
If I understand your question, you might always automatically store the Current LayerID using the following commands as the final lines in your Layer change buttons:
tv_LayerCurrentID
LayerCurrentID = result
tv_WriteUserString "LukasInfo" "LayerID" LayerCurrentID

then to return focus to that layer have a Home button that does this:
tv_ReadUserString "LukasInfo" "LayerID"
LayerCurrentID = result
tv_LayerSet LayerCurrentID

Sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: How do I focus the timeline to a layer

Post by Lukas »

Thanks Sven, that was all new to me! :) I'll test that sometime soon.

I don't think it answers my question though (unless I'm missing the point, which..I might)

My problem is when I'm using "tv_LayerSet" and going to a layer that's not shown in the Timeline (for example, I use tv_LayerSet to the top layer, even though my timeline is scrolled all the way down, so the top layer is not visible in the window). I'd want it to automatically scroll up to the selected layer.

Hope that's clear? :|
  • Lukas Sketch Panel
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
  • YouTube.com/@ClubBaboo
  • YouTube.com/@FrameOrder
User avatar
Paul Fierlinger
Posts: 8100
Joined: 03 May 2008, 12:05
Location: Pennsylvania USA
Contact:

Re: How do I focus the timeline to a layer

Post by Paul Fierlinger »

Years ago, I asked for a miniature navigation panel just for layers, something akin to the screen Navigator. All that this layers Navigator would do is enable us a bird's eye view of all layers heads, giving us the ability to quickly pinpoint the one we need to go to next. Lemec got a good start back then on a plugin doing just that, but then came the Mirage/Bauhaus fiasco and that was the end of that experiment. To me it looks like Lukas is in search for a similar solution. I'll be following this thread eagerly. I think it's been something missing in TVP from the beginning but never addressed enough.
Paul
http://www.slocumfilm.com
Desktop PC Win10-Pro -64 bit OS; 32.0 GB RAM
Processor: i7-2600 CPU@3.40GHz
AMD FirePro V7900; Intuos4 Wacom tablet
User avatar
slowtiger
Posts: 2949
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: How do I focus the timeline to a layer

Post by slowtiger »

I'm interested as well. I tend to have projects with more than 30 layers and 1000 frames, so scrolling is tedious. Sometimes I search for just that little 3 frames bit somewhere deep in the middle and miss it a dozen times while scrolling.

That miniature timeline is one thing. Another possible solution could be maximizing the timeline on the screen with just one key, like 0 now for showing/hiding. And no, that 0 is not enough, it only helps to save screen space while drawing.
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: How do I focus the timeline to a layer

Post by Lukas »

slowtiger wrote:Another possible solution could be maximizing the timeline on the screen with just one key, like 0 now for showing/hiding. And no, that 0 is not enough, it only helps to save screen space while drawing.
This is a workaround, but what you can have a room where you've put the timeline full screen, that's what I sometimes use.

I'd also like a shortcut to maximise it.
  • Lukas Sketch Panel
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
  • YouTube.com/@ClubBaboo
  • YouTube.com/@FrameOrder
User avatar
Paul Fierlinger
Posts: 8100
Joined: 03 May 2008, 12:05
Location: Pennsylvania USA
Contact:

Re: How do I focus the timeline to a layer

Post by Paul Fierlinger »

I have four screens to work with so I have one screen dedicated just for the timeline, and believe me, even that isn't enough because it'll show just 12 layers at full width when I don't need to see the sound tracks, which is what I need to see when animating. When I need to have a view of the sound graphs and notes, the count goes down to nine layers. It really needs a map; a Navigation panel that doesn't even have to be that large.
Paul
http://www.slocumfilm.com
Desktop PC Win10-Pro -64 bit OS; 32.0 GB RAM
Processor: i7-2600 CPU@3.40GHz
AMD FirePro V7900; Intuos4 Wacom tablet
User avatar
slowtiger
Posts: 2949
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: How do I focus the timeline to a layer

Post by slowtiger »

Reminds me at a time some 15 yrs ago, I was programming a timeline for a diploma project, history of european music, with a scrollable timeline over the centuries, and collapsable lines about composers, instruments, and so on. I did that in Director, and it worked perfectly, although I have no idea how I was able to do that.
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: How do I focus the timeline to a layer

Post by Svengali »

Try this:

Create a button called FindActiveLayer with an embedded script with these lines:

tv_LayerGetImage
FrameNo = result
tv_ExposureNext
tv_LayerImage FrameNo

You can also add these four lines as the last lines in your up arrow and down arrow scripts to force the new current layer to be continuously displayed in the timeline window.

Sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: How do I focus the timeline to a layer

Post by Lukas »

Svengali wrote:Try this:

Create a button called FindActiveLayer with an embedded script with these lines:

tv_LayerGetImage
FrameNo = result
tv_ExposureNext
tv_LayerImage FrameNo

You can also add these four lines as the last lines in your up arrow and down arrow scripts to force the new current layer to be continuously displayed in the timeline window.

Sven
I'll try it at the studio tomorrow. This sounds like it will solve my problem. Thanks a lot!
  • Lukas Sketch Panel
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
  • YouTube.com/@ClubBaboo
  • YouTube.com/@FrameOrder
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: How do I focus the timeline to a layer

Post by Lukas »

Works perfectly, thanks for the help Svengali :)
  • Lukas Sketch Panel
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
  • YouTube.com/@ClubBaboo
  • YouTube.com/@FrameOrder
User avatar
Soom
Posts: 1185
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: How do I focus the timeline to a layer

Post by Soom »

If I understand you correct, you want the Timeline to focus back to the selected Layer. But TVpaint does it automatically if you just click next/previous frame. so you can quickly click back and forth o0n keyboard (arrows), and the timeline will automatically zoom back to the selected layer. That what I use when I work, so I don't need any special shortcut...
Actually this was an issue discussed before, because some people didn't like this default behavior :)
at home: Hackintosh Intel Core i9-9900K, GPU AMD RX 6600 8GB, Cintiq 22" + Dell P2415Q 4K displays, MAC OS High Sierra / Windows 10, TVP Pro 11.7.1 + TVP Pro beta
at work: Windows 10, TVP 11.7.1 Std
https://vimeo.com/danas
Post Reply