[IButton,"Alpha Grab and Fill","Press to play this ZScript. ZScript can be aborted at anytime by pressing the 'esc' key.",
	[IReset,,1.99]
	[RoutineCall,"Alpha Grab and Fill"]
	[Note,"\Cffa000End of ZScript.\Cc0c0c0"]
]
[PD]
[PenMove,,6]
[IButton,"Open ZBrush Help Browser","Open the ZBrush Help Topics Browser",
	[If,
		[MemGetSize,HelpViewerStartLink]<1,
		[MemDelete,HelpViewerStartLink]
		[MemCreate,HelpViewerStartLink,199]
		[MemWriteString,HelpViewerStartLink,"&root\",0]
	]
	[IShowActions,0]
	[IPress,ZPlugin:ZBrushHelp:ViewHelpTopics]
	[IShowActions,1]
]
[RoutineDef,"Alpha Grab and Fill",
	[Note,"\Cffa000Quick Grab and Fill Alphas\Cc0c0c0\n\nThese shortcuts in the Alpha palette streamline the process for editing alphas."]
	[Note,"The \Cffa000Crop and Fill\Cc0c0c0 and \Cffa000Grab Doc\Cc0c0c0 buttons are similar to their counterparts in the Texture palette.",Alpha:CropandFill,-1]
	[Note,,Alpha:GrabDoc]
	[Note,"Let's look at \Cffa000Grab Doc\Cc0c0c0 first.\n\nWe'll start by painting some elements on the canvas..."]
	[IPress,Tool:SimpleBrush]
	[IPress,Tool:Sphere3D]
	[IPress,Stroke:DragRect]
	[IPress,Stroke:ColorSpray]
	[IPress,Color:FillLayer]
	[CanvasStroke,(ZObjStrokeV02n67=H131V59H12DV5CH11FV6BH10CV7AHEEV91HD6VA9HBAVC3H88V102H7AV10CH78V10CH79V10CH87V112H8EV112HBBV12EHD1V13CHE2V13FHEBV142HF4V145H105V149H10FV14DH110V14DH12BV155H138V15BH138V15CH139V15CH138V15CH141V165H163V15EH179V14DH193V13CH1BEV125H1E5V108H1F2VFAH1FFVEEH204VEAH204VE9H1FFVE7H1EAVD5H1C3VB8H19DVA1H18EV97H175V88H15DV78H153V70H152V70H150V6FH14FV6EH14FV6DH14CV71H142VBAH13DVE4H13AVF6H13AVF7H13AVF8H13AVF9H13AVFBH13AV11BH13AV137H138V16AH138V16DH13BV170H13FV174H141V174H151V174H152V174H153V174H153V174)]
	[IPress,Alpha:GrabDoc]
	[Note,"Like its counterpart in the Texture palette, the \Cffa000Grab Doc\Cc0c0c0 button grabs the entire canvas and adds it to the Alpha palette.",28701,-1]
	[Note,"\n\nUnlike its Texture counterpart, the color information is not used, but the depth information is.",,-1]
	[Note,"\n\nThe height and width of this alpha match the dimensions of the canvas."]
	[Note,"Alphas in this palette are high-quality.\n\nUnlike simple grayscale images generated by other painting programs, which use 8-bit grays for a maximum of 256 gray levels, ",,-1]
	[Note,"ZBrush alphas use 16 bits for more than 65,000 levels.\n\nThis results in smoother gradations and far greater depth detail.",28701]
	[Note,"These alphas can be used in a variety of ways to help define painting and sculpting actions in all of ZBrush's tools.",,-1]
	[Note,"\n\nFor example, the alpha we just generated can be used as a paintbrush shape..."]
	[IConfig,1.9]
	[IPress,Color:Clear]
	[IPress,Tool:Sphere3D]
	[IPress,Tool:SimpleBrush]
	[IPress,Alpha:Brush01]
	[ISet,Alpha:ItemInfo,9999]
	[IColorSet,219,166,57]
	[IPress,Stroke:Spray]
	[CanvasStroke,( )]
	[Note,"Another way the \Cffa000Grab Doc\Cc0c0c0 button can be used is in generating precise gradients.",alpha:grabdoc,-1]
	[Note,"\n\nTo illustrate, we'll draw a Plane3D object on the screen..."]
	[IPress,Color:Clear]
	[IPress,Tool:SimpleBrush]
	[IPress,Tool:Plane3D]
	[CanvasStroke,(ZObjStrokeV02n16=H132VFFH133V100H133V103H134V10CH136V11CH139V12BH13EV13DH140V14CH140V157H140V17BH137V1D5H131V200H131V202H131V207H132V207H132V207)]
	[Note,"We'll scale it so it's larger than the canvas, and tilt it in a direction matching our desired gradient..."]
	[IPress,Transform:Scale]
	[CanvasStroke,(ZObjStrokeV03n7%P132PFFPNNN-1sBAAD2EsBAAD2EsBAAD2EZ=H14FV129H150V12BH1C6V1D3H21AV23AH232V256H245V261H245V261)]
	[IPress,Transform:Rotate]
	[CanvasStroke,(ZObjStrokeV03n32%P132PFFPNNN-1s6678832s6678832s6678832Z=H161VE4H158VE7H156VE8H151VE9H150VEAH14CVEEH149VEFH148VF0H145VF2H140VF7H13BVFDH138VFEH137VFFH134V102H133V103H132V104H130V105H12EV106H12CV107H12AV108H128V10AH125V10DH124V10EH122V110H11FV111H11AV111H11AV110H11AV10FH116V110H113V110H112V111H112V111)]
	[IPress,Transform:DrawPointer]
	[Note,"Now the plane is tilted so the portion near the lower-left corner of the canvas is furthest away from us, and the upper-right portion is nearest us."]
	[IPress,Alpha:GrabDoc]
	[Note,"Pressing \Cffa000Grab Doc\Cc0c0c0 results in a precise (16-bit) gradient we can use...",28701]
	[IPress,Color:Clear]
	[IColorSet,90,90,255]
	[IPress,Color:FillLayer]
	[IPress,Tool:SimpleBrush]
	[ISet,Alpha:ItemInfo,9999]
	[IPress,Stroke:Dots]
	[IPress,Stroke:DragRect]
	[ISet,Draw:RgbIntensity,100]
	[IUnPress,Draw:Zadd]
	[IPress,Draw:Rgb]
	[IColorSet,255,255,255]
	[CanvasStroke,(ZObjStrokeV02n36=H141VF0H141VF3H141VF8H141VFEH141V102H141V104H142V10CH143V111H143V117H144V119H144V11DH144V11FH144V121H145V125H146V12CH148V138H149V13BH14AV140H14BV145H14CV148H151V158H152V15BH152V15EH152V162H152V163H153V167H153V168H153V169H153V16AH153V16BH153V16CH155V174H156V17DH156V180H158V180H158V180)]
	[IPress,Transform:Move]
	[IPress,Transform:Scale]
	[CanvasStroke,(ZObjStrokeV03n11%P141PF0PNNN-1s671D94s671D94s149FA1Z=H13FV9CH13FV96H13FV7EH140V67H141V5FH141V5BH142V5AH142V57H142V56H141V57H141V57)]
	[CanvasStroke,(ZObjStrokeV03n24%P141PF0PNNN-1s671D94s671D94s149FA1Z=HECVF1HEBVF1HE9VEFHE8VEFHE2VF1HE1VF2HE5VF8HE4VF8HE2VF8HCFVF4HC4VF3HBCVF3H98VF6H8EVF6H87VF7H86VF7H82VF8H78VFBH73VFBH70VFBH6FVF9H6AVF9H5FVF7H5FVF7)]
	[CanvasStroke,(ZObjStrokeV03n7%P141PF0PNNN-1s1122AA3s671D94s149FA1Z=H140V9EH142V91H14AV7AH14AV78H14AV77H150V49H150V49)]
	[IPress,Transform:DrawPointer]
	[IPress,Tool:SimpleBrush]
	[IPress,Alpha:ZGrab02]
	[Note,"The \Cffa000Crop and Fill\Cc0c0c0 button does the opposite. It takes the selected alpha, crops the document to its height and width, and fills the document using the current color and material...",alpha:cropandfill]
	[IPress,Alpha:Brush15]
	[IKeyPress,13,
		[IPress,Alpha:CropAndFill]
	]
	[Note,"The document now contains depth data matching our chosen alpha at its defined size.",1004]
	[Note,"To control the depth range for any alpha, you can use the \Cffa000Alpha Depth Factor\Cc0c0c0 slider.",Alpha:AlphaDepthFactor,-1]
	[Note,"\n\nWhen its value is 0, the depth is calculated automatically.\n\nAny other value specifies the maximum depth for the selected alpha.",,-1]
	[Note,"\n\nFor alphas grabbed from the document, this slider is set to its true depth value."]
	[Note,"We'll set this slider to a value of 2000, fill the document again, and observe the difference.",Alpha:AlphaDepthFactor]
	[ISet,Alpha:AlphaDepthFactor,2000]
	[IPress,Alpha:CropAndFill]
	[Note,"\Cffa000Crop and Fill\Cc0c0c0 is extremely useful for editing alphas, because you can use any of ZBrush's tools to edit depth information as easily as painting color information.",Alpha:CropAndFill,-1]
	[Note,"\n\nOne powerful application of this feature is in editing displacement maps.",,-1]
	[Note," Once a displacement map has been generated, the Crop and Fill button enables you to edit the map precisely, without distorting it when placing it on the canvas."]
]
