Layer Attenuation Toggle script?

Share your custom panels, brushes, papers... (you need to be registered to read posts in this section)
Post Reply
User avatar
Soom
Posts: 1168
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Layer Attenuation Toggle script?

Post by Soom »

I have a script that I downloaded from somewhere (can't find the original post now), that is called Layers 3-Way Toggle, that toggles between layers attenuation options.
Unfortunately it is not working on MAC 32bit version. Does somebody have a working version?
thanks
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
Svengali
Posts: 1555
Joined: 28 Dec 2006, 10:08

Re: Layer Attenuation Toggle script?

Post by Svengali »

Soom wrote: 27 Aug 2018, 19:56 Layers 3-Way Toggle - Unfortunately it is not working on MAC 32bit version. Does somebody have a working version?
Can you explain just how is it not working? (example, I press the icon and nothing happens or I press the icon and then all the layers go blank... or?)

IGNORE THE FOLLOWING ADVICE: Something to try: Hold down the shift key while you toggle. It will ask you to set the attenuation for layers which are not the current layer - it defaults to 40, so if it is 0, reset it to 40 and press ENTER. That might fix it. This actually refers to a later, expanded version of the script...

If not, I'll try to figure out from what you describe, why it's not working and a possible solution.

Sven
Last edited by Svengali on 01 May 2024, 19:55, edited 1 time in total.
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
Soom
Posts: 1168
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Layer Attenuation Toggle script?

Post by Soom »

Hi Sven
So - 1st click – nothing, second click – default action (whatever is set in the attenuation menu in the timeline), third click - back to normal (all visible).
It seems that the first click (the partial attenuation) is not working at all - does nothing.
holding SHIFT didn't do anything too...
Thanks for the concern, I hope you can solve this - it's a really useful script I was using all the time on Windows.
Danas
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
Svengali
Posts: 1555
Joined: 28 Dec 2006, 10:08

double post...

Post by Svengali »

double post...
Last edited by Svengali on 30 Aug 2018, 22:35, edited 2 times in total.
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
Svengali
Posts: 1555
Joined: 28 Dec 2006, 10:08

Re: Layer Attenuation Toggle script?

Post by Svengali »

1. The original post for the 3 way toggle is here.
2. FYI, Holding the Shift down when you click on the attenuation icon won't change anything on the screen - all it does is ask you to enter a percentage value for the attenuation: lower the number, the more attenuation.
3. I believe the posted version generates a "status line" each time you click the attenuation icon (its appears momentarily on the bottom line, along with the Room #)
a. current layer = n Display mode = Current layer 100% all others 30%
b. current layer = n Display mode = Current layer only%
c. current layer = n Display mode = all layers, 100%%
(the extra % sign is a bug)
Can you note down the status line for each of the three states and post what it says?
4. Actually, looking at the script, I can't really see why there should be a problem on the Mac. Could you see what happens if you download it again and reinstall it?

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
Soom
Posts: 1168
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Layer Attenuation Toggle script?

Post by Soom »

Svengali wrote: 30 Aug 2018, 22:23 double post...
Ok, can someone merge these two please?
Svengali wrote: 30 Aug 2018, 22:31 1. The original post for the 3 way toggle is here.
2. FYI, Holding the Shift down when you click on the attenuation icon won't change anything on the screen - all it does is ask you to enter a percentage value for the attenuation: lower the number, the more attenuation.
3. I believe the posted version generates a "status line" each time you click the attenuation icon (its appears momentarily on the bottom line, along with the Room #)
a. current layer = n Display mode = Current layer 100% all others 30%
b. current layer = n Display mode = Current layer only%
c. current layer = n Display mode = all layers, 100%%
(the extra % sign is a bug)
Can you note down the status line for each of the three states and post what it says?
4. Actually, looking at the script, I can't really see why there should be a problem on the Mac. Could you see what happens if you download it again and reinstall it?

Sven
sorry Sven, not working at all:
2. I understand what should happen when clicking while holding SHIFT, but nothing happens. No line to write anything pops up...
3. I don't see any status line anywhere, besides I don't have Rooms, because I am on a STD 11.0.8 version. Clicking the action would not produce any messages in any place in TVP...
Also I notice, that the first click, which is supposed to turn attenuation ON with other layers at 30% does nothing, although in TVP it's supposed to turn the Attenuation icon (the little eye) ON. It doesn't - the icon stays gray.
Here is a video recording of my screen
tvp_3way_toggle.mov
(23.36 MiB) Downloaded 173 times
thanks, Danas
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
Svengali
Posts: 1555
Joined: 28 Dec 2006, 10:08

Re: Layer Attenuation Toggle script?

Post by Svengali »

I've created a new ToggleLayers icon that runs an embedded, bare-bones script. If this doesn't solve it on your computer, I think the problem is likely not the button/script. In this version the partial Attenuation-mode of other layers is hardwired to 35.

If anyone else has time to download and test the button, any feedback could be helpful.

thanks,
Sven
Attachments
ToggleLayers.tvpx
(101 KiB) Downloaded 164 times
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
Soom
Posts: 1168
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Layer Attenuation Toggle script?

Post by Soom »

The new button just gets stuck after the first click in Display Current mode :cry:
should I try reinstalling TVPaint?
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
Svengali
Posts: 1555
Joined: 28 Dec 2006, 10:08

Re: Layer Attenuation Toggle script?

Post by Svengali »

Soom wrote: 03 Sep 2018, 20:59 The new button just gets stuck after the first click in Display Current mode :cry:
should I try reinstalling TVPaint?
Sorry, but at this point I am out of suggestions. Reinstalling TVPaint might or might not make a difference. It sounds as if the tv_Display Attenuation command in GEORGE might be broken in the TVPaint 32bit version for the Mac. See if you can duplicate the problem on another machine with the same configuration. From what you previously said, the Layer Attenuation Toggle script DOES work in TVPaint on your Windows machine???

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
Soom
Posts: 1168
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Layer Attenuation Toggle script?

Post by Soom »

Svengali wrote: 03 Sep 2018, 22:51 Sorry, but at this point I am out of suggestions. Reinstalling TVPaint might or might not make a difference. It sounds as if the tv_Display Attenuation command in GEORGE might be broken in the TVPaint 32bit version for the Mac. See if you can duplicate the problem on another machine with the same configuration. From what you previously said, the Layer Attenuation Toggle script DOES work in TVPaint on your Windows machine???

Sven
Ok, I have completely reinstalled TVPaint from scratch, and unfortunately it didn't help. I guess the only option is that the script is not working in TVP 32 bit on Mac. Should I make a bug report? but I don't know which script it is exactly... can you do it maybe?
thanks, D
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
Svengali
Posts: 1555
Joined: 28 Dec 2006, 10:08

Re: Layer Attenuation Toggle script?

Post by Svengali »

I think it might be better for you to report it giving all your Mac specs: OS, version of TVPaint, and an explicit description of the problem (works in windows, doesn't work on your Mac setup) - link the report to this thread?

The suspect command is: tv_display "layerattenuation" [0|1|"on"|"off"|"toggle"] ["value" iValue]

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
Soom
Posts: 1168
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Layer Attenuation Toggle script?

Post by Soom »

Svengali wrote: 13 Sep 2018, 20:47 I think it might be better for you to report it giving all your Mac specs: OS, version of TVPaint, and an explicit description of the problem (works in windows, doesn't work on your Mac setup) - link the report to this thread?

The suspect command is: tv_display "layerattenuation" [0|1|"on"|"off"|"toggle"] ["value" iValue]

Sven
Dear Sven
This script is now working again for me both on Mac and on Windows. One question - is it possible to change the 35% Attenuation value somehow? I tried editing the George Script but it didn't change
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
Svengali
Posts: 1555
Joined: 28 Dec 2006, 10:08

Re: Layer Attenuation Toggle script?

Post by Svengali »

IF you are trying to edit the embedded script you need to change the "35" value in two lines to what ever you want.

more opaque layer > 35
less opaque layer < 35

// ToggleLayers.GRG - Sept 1 2018 - updated
// Svengali © 2018

tv_Display "all" RESET
TDisplay = result
tv_Display LAYERATTENUATION "on" VALUE 100 RESET
parse result TAction TStatus TValue

IF CMP(TDisplay, "current") && TValue == 35
tv_Display CURRENT
tv_Display LAYERATTENUATION "off" VALUE 100
END

IF CMP(TDisplay,"current") && TValue == 100
tv_Display ALL
tv_Display LAYERATTENUATION "off" VALUE 100
END

IF CMP(TDisplay, "all" ) && TValue == 100
tv_Display CURRENT

tv_Display LAYERATTENUATION "on" VALUE 35
END

FOR i = 1 TO 50000
tv_nop
END


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
Soom
Posts: 1168
Joined: 25 Jul 2011, 16:25
Location: World
Contact:

Re: Layer Attenuation Toggle script?

Post by Soom »

Svengali wrote: Yesterday, 07:27 IF you are trying to edit the embedded script you need to change the "35" value in two lines to what ever you want.

more opaque layer > 35
less opaque layer < 35

// ToggleLayers.GRG - Sept 1 2018 - updated
// Svengali © 2018

tv_Display "all" RESET
TDisplay = result
tv_Display LAYERATTENUATION "on" VALUE 100 RESET
parse result TAction TStatus TValue

IF CMP(TDisplay, "current") && TValue == 35
tv_Display CURRENT
tv_Display LAYERATTENUATION "off" VALUE 100
END

IF CMP(TDisplay,"current") && TValue == 100
tv_Display ALL
tv_Display LAYERATTENUATION "off" VALUE 100
END

IF CMP(TDisplay, "all" ) && TValue == 100
tv_Display CURRENT

tv_Display LAYERATTENUATION "on" VALUE 35
END

FOR i = 1 TO 50000
tv_nop
END


sven
I did it first on Windows on TVP beta 12, and it didn't work - it stays on 35% no matter what I type into the george script. I tried then changing this on my Mac TVP11.7 and it works perfectly! Didn't try on more versions.
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
Svengali
Posts: 1555
Joined: 28 Dec 2006, 10:08

Re: Layer Attenuation Toggle script?

Post by Svengali »

Hmm. Must be something different in the GEORGE interpreter in Windows version of TVP Beta12.

But I'm happy to hear you've got it up and working on your Mac. Just out of my own curiosity, what have you changed the Attenuation value to relative to the default 35%?

Sven

Afterthought: You know, there are two versions of this script/button... are you using the same script/button on both?

The fix listed above is for the simple version.

In the other version, you can change the value through a popup option that is accessed by holding down the shift key while you click on the script/button. Then, in the popup you simply enter a number between 1 and 100 to update and store the Attenuation percentage.
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
Post Reply