[sectionBegin," The Snake Hook Brush ",0,"ZScript Primer (Press to expand this section)",
	[varDef,zbPrimerTempOpenSH][varDef,zbInitDocSavedSH,0][varDef,zbInitSavedDocSH,""]
	[iPress,7442]
	[if,(zbPrimerTempOpenSH),
		[iKeyPress,'N',[iPress,document:newdocument]]
	, // else
		[if,[messageYesNo,"OK to clear all customized tools, lights and materials?","DOCUMENT MUST BE CLEARED BEFORE PROCEEDING..."],
			[if,[isEnabled,document:save],
				[if,[messageYesno,"Would you like to save this document before proceeding?","Document has not been saved."],
					[iPress,document:saveas]
					[varSet,zbInitSavedDocSH,[fileNameGetLastUsed]]
					[varSet,zbInitDocSavedSH,1]
				] // end if (user saves)
			] // end if (save enabled)
			[Note,"One moment please...",,2]
			[iKeyPress,13,[iReset]]
			[varSet,zbPrimerTempOpenSH,1]
		, // else (user won't reset)
			[iUnPress,0][exit]
		] // end if (wanna reset?)
	] // end if PrimerTemp
	[Note,"This primer describes the Snake Hook Brush: a convenient tool for painting horns, tentacles and other protrusions.",tool:snakehookbrush,-1]
	[Note,"\n\n\C909090(Click to continue)\Cc0c0c0",,0]
] // end sectionBegin
[pd][paintBackSliver,2,40,40,40][pd]
The [buttonPress,tool:snakehookbrush,"Snake Hook Brush"] is a convenient tool for painting horns, tentacles and similar protrusions from painted elements.

To use the Snake Hook Brush, simply click on a painted element and drag in any direction [iButton,"show me","Show the Snake Hook Brush in action",
	[routineCall,zbPrimerSnakeInit]
	[iColorSet,60,60,255]
	[iSet,tool:modifiers:colorblend,55]
	[canvasStrokes,zbPrimerSnakeStrokes01]
]. // end iButton
The Snake Hook Brush "pulls" material from the painted element, following your mouse/tablet motion, constantly moving toward you, the viewer.

This tool only works on elements already painted, and has no effect on a blank canvas.

You can control how color is applied to the protrusions. Each takes the color of the element clicked on at its base, and graduates to a second color at its tip. The [buttonFind,tool:modifiers:colorblend,"Color Blend modifier"] determines the second color. If set to 100, the second color is the [buttonFind,color:maincolor,"Foreground Color"] [iButton,"show me","Paint with Color Blend set to 100",
	[routineCall,zbPrimerSnakeInit]
	[iColorSet,255,200,0]
	[iSet,tool:modifiers:colorblend,100]
	[canvasStrokes,zbPrimerSnakeStrokes01]
]; // end iButton
if 0, the second color is the same as the base [iButton,"show me","Paint with Color Blend set to 0",
	[routineCall,zbPrimerSnakeInit]
	[iColorSet,255,200,0]
	[iSet,tool:modifiers:colorblend,0]
	[canvasStrokes,zbPrimerSnakeStrokes01]
]. // end iButton
[pd]
If set to any value inbetween, the base color is mixed with that percentage of the Foreground Color. For example, if the base color is red, the Foreground Color is yellow and the Color Blend modifier is set to 60, the tip color will be 40% red and 60% yellow [iButton,"show me","Paint with Color Blend set to 60",
	[routineCall,zbPrimerSnakeInit]
	[iColorSet,255,200,0]
	[iSet,tool:modifiers:colorblend,60]
	[canvasStrokes,zbPrimerSnakeStrokes01]
]. // end iButton
[pd][pd]
You can also use any [buttonFind,28701,Alpha] to shape the protrusion [iButton,"show me","Paint with different Alphas",
	[routineCall,zbPrimerSnakeInit]
	[iColorSet,255,200,0]
	[iSet,alpha:itemInfo,7]
	[canvasStrokes,zbPrimerSnakeStrokes01]
	[delay,1]
	[routineCall,zbPrimerSnakeInit]
	[iColorSet,255,200,0]
	[iSet,alpha:itemInfo,11]
	[canvasStrokes,zbPrimerSnakeStrokes01]
]. // end iButton


[iButton," Return to your original (saved) document ","Return to your original file",
	[fileNameSetNext,zbInitSavedDocSH]
	[if,[isEnabled,document:save],
		[iKeyPress,'N',[iPress,document:open]]
	, // else nothing to save
		[iPress,document:open]
	] // end if
	[varSet,zbInitSavedDocSH,""]
	[varSet,zbInitDocSavedSH,0]
	[varSet,zbPrimerTempOpenSH,0]
] // end iButton

[routineDef,zbPrimerSnakeInit,
	[iUnPress,transform:editobject]
	[iPress,transform:drawpointer]
	[iPress,layer:modifiers:clear]
	[iPress,tool:sphere3d]
	[iSet,texture:itemInfo,0]
	[iSet,material:itemInfo,1]
	[iColorSet,255,50,50]
	[canvasClick,320,240,320,250]
	[transformSet,320,240,0,180,180,180,60,25,0]
	[iSet,tool:itemInfo,7]
] // end routine
[varSet,zbPrimerSnakeStrokes01,(ZObjStrokesV01n4=S(ZObjStrokeV01n15x3=H384V146P.041H384V146P.041H387V144P.462H392V140P.472H398V135P.487H410V126P.501H421V118P.515H434V110P.524H448V103P.531H464V99P.536H479V95P.539H498V94P.542H514V99P.544H528V107P.272H528V107P.272)S(ZObjStrokeV01n14x3=H228V139P.100H228V139P.100H225V134P.228H220V129P.342H213V122P.434H206V116P.504H195V109P.561H178V97P.605H165V89P.639H153V82P.664H137V73P.688H116V65P.71H86V64P.706H66V70P.353)S(ZObjStrokeV01n28x3=H234V286P.048H234V286P.048H233V279P.152H230V274P.244H223V265P.323H216V258P.385H207V252P.434H197V250P.472H186V253P.499H181V260P.517H174V273P.530H167V289P.540H161V300P.550H151V315P.559H138V329P.570H126V334P.585H115V330P.597H105V316P.609H96V300P.618H85V289P.626H70V283P.631H62V286P.632H54V298P.631H50V314P.632H43V343P.638H36V363P.645H19V381P.645H7V380P.322)S(ZObjStrokeV01n34x3=H368V307P.117H368V307P.117H372V304P.210H382V294P.295H396V283P.362H414V268P.414H431V259P.451H439V265P.475H442V272P.493H440V291P.509H434V312P.523H429V330P.536H428V349P.547H435V359P.555H447V356P.562H458V349P.564
H471V343P.564H482V339P.560H485V343P.558H487V349P.556H486V361P.555H480V379P.557H475V397P.559H476V411P.564H490V411P.568H508V406P.568H529V405P.566H538V413P.566H545V426P.567H546V450P.575H556V464P.585H592V463P.594H616V467P.602H618V480P.301))]

[pd][pd][paintBackSliver,2,40,40,40][pd][sectionEnd] // end of Snake Hook Brush
