Toggle Drying Script (optimized)

Share your custom panels, brushes, papers... (you need to be registered to read posts in this section)
Post Reply
User avatar
lemec
Posts: 1678
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Toggle Drying Script (optimized)

Post by lemec »

Do you need a hotkey to toggle drying mode for brushes?

Create a custom panel button and Edit it.
Name the button something like: "Brush: Toggle Drying"

Set the first action entry to: "Embedded George Script"

Paste the following code in.

Code: Select all

PARAM NONE

tv_getactivetool
PARSE Result curTool toolArgs
dryVal = 0

WHILE (LEN(toolArgs) > 1)
	PARSE toolArgs curArg curParam toolArgs
	IF (CMP(curArg, "dry"))
		IF (curParam == 0)
			dryVal = 1
		ELSE
			dryVal = 0
		END
		tv_Cmd curTool Dry DryVal
	END
END
EDIT: Managed to shorten the script down significantly, thanks to a tip from Svengali
Last edited by lemec on 23 Nov 2009, 18:47, edited 2 times in total.
(Win7x64, TVP Pro 11 32-bit)
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: Toggle Drying Script

Post by Elodie »

hanks for sharing your knowledge, Mark =)
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: Toggle Drying Script

Post by ZigOtto »

Elodie wrote:hanks for sharing your knowledge, Mark =)
Tom ...?
Image
:arrow:
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: Toggle Drying Script

Post by Elodie »

Wou, it takes me about 30 secondes to understand your joke XD
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: Toggle Drying Script

Post by ZigOtto »

probably because you're faster when typing on your keyboard than when understanding your reading . :wink:
Elodie
Posts: 13912
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: Toggle Drying Script (optimized)

Post by Elodie »

:roll:
Post Reply