[ArtRage] 程よく線画を馴染ませるスクリプト

線画をぼかして、彩色と線画を馴染ませる作業をする処理を、ARScript化してみました。

//===========================================================================
//===========================================================================
//                            ArtRage Script File.
//===========================================================================
//===========================================================================


//===========================================================================
// Version Block - Script version and ArtRage version:
//===========================================================================

<Version>
    ArtRage Version: ArtRage 7
    ArtRage Build: 7.1.3
    Professional Edition: Yes
    Script Version: 1
</Version>


//===========================================================================
// Header block - Info about the painting/person who generated this script:
//===========================================================================

<Header>
    Script Feature Flags: 0x000000000
</Header>


//===========================================================================
// Script data follows:
//===========================================================================

<Events>

int BlurLayer(string sLayerName) {
	int nLayer = 0;
	int nBlurLayer = 0;
	int nNameLength = sLayerName.Length();

	for(nLayer = 0; nLayer < LayerCount(); nLayer++) {
		string sLayerNameCom = LayerName(nLayer);
		sLayerNameCom.ToLower();
		if(sLayerNameCom == sLayerName) {

			if(LayerType(nLayer) != 0) continue;

			nBlurLayer = nLayer + 1;

			Wait: 0.000s	EvType: Command	CommandID: CID_DuplicateSpecificLayer	ParamType: uint32	Value: { nLayer }
			Wait: 0.000s	EvType: Command	CommandID: LayerAdjustment	ID: 0x000000002	Idx: nBlurLayer	Blur Radius: 4
			Wait: 0.000s	EvType: Command	CommandID: CID_ToggleSpecificLayerLocked	ParamType: LayerProp	Value: { nBlurLayer, 1 }
			Wait: 0.000s	EvType: Command	CommandID: CID_SetSpecificLayerBlend	ParamType: LayerTwoOp	Value: { nBlurLayer, 3000000193 }
			Wait: 0.000s	EvType: Command	CommandID: CurrentGradient	Name: "Main - Grey"	Smooth: 1	ColourPointCount: 2	AlphaPointCount: 2	Points: {
					(Type: 1 (Fore)	RGB: (0.0, 0.0, 0.0)	Pos: 0	Mid: 0.5),
					(Type: 1 (Fore)	RGB: (0.0, 0.0, 0.0)	Pos: 1	Mid: 0.5),
					(Alpha: 1	Pos: 0	Mid: 0.5),	(Alpha: 1	Pos: 1	Mid: 0.5)
				}    // End of Gradient point list.

			SetColourRGB(182.0 / 255.0, 104.0 / 255.0, 104.0 / 255.0)

			Wait: 0.000s	EvType: Command	CommandID: ToolPreset	ToolID: 4921 (Fill Tool )	Tool Data: {
							┹┓──├───┑──────┿───────────┿━───────◾━──◍◌◌┽━───━─────────▀┿━───────────━───┶▔╗┾────────▃╃─◿╪━──────▄╃─◿┎───────╆─╲─╥─╤─┍─┊───▅╃─◿┄─────────▀┿■╃─◿┄───────│───□╃─◿╈───────▢╃─◿┄───────━───▣╃─◿┌─────────
							──────────▤╃─◿┄───────────▥╃─◿┄──────────┿□╃─◿╈───────▢╃─◿┄───────━───▣╃─◿┌───────◦◥╥┿◵◴◴┾◵◴◴┾▤╃─◿┄─────────▀┿▥╃─◿┄──────────┿◀╃─◿┄───────│───◁╃─◿┰───────◂╃─◿┄─────────▀┿◃╃─◿┄───────────◄╃─◿┄─────────
							─┿◁╃─◿┰───────◂╃─◿┄─────────▀┿◃╃─◿┄─────────▀┿◄╃─◿┄──────────┿▀╄─◿┌───────▁╄─◿────────▐╄─◿┄───────────░╄─◿┄──────────◿▒╄─◿┄───────────▓╄─◿┄───────━───
				}    // End of tool preset binary data.
			Wait: 0.000s	EvType: Command	CommandID: CID_SelectSpecificLayer	ParamType: uint32	Value: { nBlurLayer }

			<StrokeEvent>
				<StrokeHeader>
					<EventPt>	Wait: 0.000s	Loc: (956, -22)	Pr: 1	Ti: 1	Ro: 1.25	Fw: 1	Bt: 0	Rv: NO	Iv: NO	</EventPt>
					<Recorded>	Yes	</Recorded>
					<RandSeed>	0x000000000, 0x00000000C	</RandSeed>
					<Smooth>	Count:	3
							Loc: (956, -22)	Pr: 1	Ti: 1	Ro: 1.25	Fw: 1	Bt: 0
							Loc: (956, -24)	Pr: 1	Ti: 1	Ro: 1.25	Fw: 1	Bt: 0
							Loc: (956, -26)	Pr: 1	Ti: 1	Ro: 1.25	Fw: 1	Bt: 0
					</Smooth>
					<PrevA>	Loc: (792, 566)	Pr: 1	Ti: 1	Ro: 1.25	Fw: 1	Bt: 0	</PrevA>
					<PrevB>	Loc: (792.825, 558.575)	Pr: 1	Ti: 1	Ro: 1.25	Fw: 1	Bt: 0	</PrevB>
					<OldHd>	Loc: (956, -24)	Pr: 0	Ti: 1	Ro: 1.25	Fw: 1	Bt: 0	Dr: (-0.404854, -0.914381)	Hd: (0.914381, -0.404854)	</OldHd>
					<NewHd>	Loc: (956, -22)	Pr: 0	Ti: 1	Ro: 1.25	Fw: 1	Bt: 0	Dr: (-0.520367, -0.853943)	Hd: (0.853943, -0.520367)	</NewHd>
				</StrokeHeader>
			</StrokeEvent>

			return;
		}
	}
}

void main() {
	string sLayerName = "line";

	BlurLayer(sLayerName);
}

main();