Page 1 of 1

How do I focus the timeline to a layer

Posted: 15 May 2013, 08:46
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?

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 12:29
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

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 13:02
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? :|

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 13:13
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.

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 13:42
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.

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 13:58
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.

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 14:36
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.

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 14:45
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.

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 16:03
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

Re: How do I focus the timeline to a layer

Posted: 15 May 2013, 16:20
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!

Re: How do I focus the timeline to a layer

Posted: 16 May 2013, 07:20
by Lukas
Works perfectly, thanks for the help Svengali :)

Re: How do I focus the timeline to a layer

Posted: 27 May 2013, 16:37
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 :)