Move up/down a layer (ignoring locked layers)

A forum dedicated to George scripting questions
Post Reply
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Move up/down a layer (ignoring locked layers)

Post by Lukas »

I'm trying to make 2 buttons to bind to arrow up and arrow down. That behave like normal 'Layer: Go up' and 'Layer: Go down' but they ignore locked layers.

So far I've not accomplished much... :(
I was hoping someone smarter has a clue, or maybe there's something out there like it. :D
  • 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: Move up/down a layer (ignoring locked layers)

Post by Paul Fierlinger »

Key:Layer:Previous Layer/Next Layer works that way here.
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
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: Move up/down a layer (ignoring locked layers)

Post by Lukas »

Paul Fierlinger wrote:Key:Layer:Previous Layer/Next Layer works that way here.
I was very happy to read your post, thinking my problem was solved, but here it still goes to locked layers...

"Layer: Go up" seems to do exactly the same as "Layer: Previous Layer"

Could it be a mac thing? What should the difference be between the two actions?

edit: I tested it on a windows machine (TVP 9.5) and it's the same there
  • 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: Move up/down a layer (ignoring locked layers)

Post by Paul Fierlinger »

What do you mean by "goes to locked layer"? ...where the action then stops? When I use these, they go through all the layers, the only difference being that in my custom setup I have added "shake" to next/previous layer, and locked layers don't shake.
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
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: Move up/down a layer (ignoring locked layers)

Post by Lukas »

Ah I see. So it doesn't really skip locked layers, but it gives visual feedback by not shaking the image so you know you have to press the button again?
  • 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: Move up/down a layer (ignoring locked layers)

Post by Paul Fierlinger »

That's the way it works by default, not that I want it that way, but good enough. I guess "locked" means "It won't even shake". But I use these buttons while searching where I am in a stack of layers so this is why I added the shake attribute.
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
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: Move up/down a layer (ignoring locked layers)

Post by Lukas »

I broke my brains getting this right... but it works now.

Here's a tvpx panel with 2 arrows that skip locked layers, if anyone is interested :)
Attachments
skiplockarrows.png
skiplockarrows.png (5.31 KiB) Viewed 997 times
LukasSkiplockArrows.tvpx
(131 KiB) Downloaded 133 times
  • 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: Move up/down a layer (ignoring locked layers)

Post by Paul Fierlinger »

Handy. I added the shakes though and in time I should find out if I like it to skip locked layers -- right now I can't see the advantage or disadvantage. :|
Thanks (nice icons). :)
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
Post Reply