#target photoshop

//Matlaştırıcı Pudra



//Generated Mon Feb 16 2015 22:07:55 GMT+0200


cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };


//==================== Matlaştırıcı Pudra ==============

$._ext_matpudra={
		run : function Matla_t_r_c_Pudra() {
			// Make
			function step1(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				var ref1 = new ActionReference();
				ref1.putClass(sTID("contentLayer"));
				desc1.putReference(cTID('null'), ref1);
				var desc2 = new ActionDescriptor();
				var desc3 = new ActionDescriptor();
				var desc4 = new ActionDescriptor();
				desc4.putDouble(cTID('Rd  '), 221.000518798828);
				desc4.putDouble(cTID('Grn '), 161.001434326172);
				desc4.putDouble(cTID('Bl  '), 129.001922607422);
				desc3.putObject(cTID('Clr '), sTID("RGBColor"), desc4);
				desc2.putObject(cTID('Type'), sTID("solidColorLayer"), desc3);
				desc1.putObject(cTID('Usng'), sTID("contentLayer"), desc2);
				executeAction(cTID('Mk  '), desc1, dialogMode);
			};

			// Set
			function step2(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				var ref1 = new ActionReference();
				ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
				desc1.putReference(cTID('null'), ref1);
				var desc2 = new ActionDescriptor();
				desc2.putString(cTID('Nm  '), "Cilt Rengi");
				desc1.putObject(cTID('T   '), cTID('Lyr '), desc2);
				executeAction(cTID('setd'), desc1, dialogMode);
			};

			// Set
			function step3(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				var ref1 = new ActionReference();
				ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
				desc1.putReference(cTID('null'), ref1);
				var desc2 = new ActionDescriptor();
				var list1 = new ActionList();
				var desc3 = new ActionDescriptor();
				var ref2 = new ActionReference();
				ref2.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Gry '));
				desc3.putReference(cTID('Chnl'), ref2);
				desc3.putInteger(cTID('SrcB'), 0);
				desc3.putInteger(cTID('Srcl'), 0);
				desc3.putInteger(cTID('SrcW'), 255);
				desc3.putInteger(cTID('Srcm'), 255);
				desc3.putInteger(cTID('DstB'), 124);
				desc3.putInteger(cTID('Dstl'), 255);
				desc3.putInteger(cTID('DstW'), 255);
				desc3.putInteger(cTID('Dstt'), 255);
				list1.putObject(cTID('Blnd'), desc3);
				desc2.putList(cTID('Blnd'), list1);
				var desc4 = new ActionDescriptor();
				desc4.putUnitDouble(cTID('Scl '), cTID('#Prc'), 416.666666666667);
				desc2.putObject(cTID('Lefx'), cTID('Lefx'), desc4);
				desc1.putObject(cTID('T   '), cTID('Lyr '), desc2);
				executeAction(cTID('setd'), desc1, dialogMode);
			};

			// Make
			function step4(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				var ref1 = new ActionReference();
				ref1.putClass(sTID("layerSection"));
				desc1.putReference(cTID('null'), ref1);
				var ref2 = new ActionReference();
				ref2.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
				desc1.putReference(cTID('From'), ref2);
				executeAction(cTID('Mk  '), desc1, dialogMode);
			};

			// Set
			function step5(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				var ref1 = new ActionReference();
				ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
				desc1.putReference(cTID('null'), ref1);
				var desc2 = new ActionDescriptor();
				desc2.putString(cTID('Nm  '), "Matlaştırıcı Pudra");
				desc1.putObject(cTID('T   '), cTID('Lyr '), desc2);
				executeAction(cTID('setd'), desc1, dialogMode);
			};

			// Make
			function step6(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				desc1.putClass(cTID('Nw  '), cTID('Chnl'));
				var ref1 = new ActionReference();
				ref1.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Msk '));
				desc1.putReference(cTID('At  '), ref1);
				desc1.putEnumerated(cTID('Usng'), cTID('UsrM'), cTID('HdAl'));
				executeAction(cTID('Mk  '), desc1, dialogMode);
			};

			// Stop
			function step7(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				desc1.putString(cTID('Msge'), "‘Cilt Rengi’ layerına tıklayıp, modelin cildinden bir renk dokusu alınız. Daha sonra ‘Matlaştırıcı Pudra’ grubunun siyah maskeli alanına tıklayıp, cildin patlamış bölgelerini boyayınız.");
				desc1.putBoolean(cTID('Cntn'), true);
				executeAction(cTID('Stop'), desc1, dialogMode);
			};

			// Stop
			function step8(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				desc1.putString(cTID('Msge'), "*Bir sonraki action'ı uygulamadan önce grubun kapalı olduğundan emin olun. Grubu kapatmak için yanındaki üçgen ikonuna basın");
				desc1.putBoolean(cTID('Cntn'), true);
				executeAction(cTID('Stop'), desc1, dialogMode);
			};

			// Select
			function step9(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				var ref1 = new ActionReference();
				ref1.putClass(cTID('PbTl'));
				desc1.putReference(cTID('null'), ref1);
				executeAction(cTID('slct'), desc1, dialogMode);
			};

			// Reset
			function step10(enabled, withDialog) {
				if (enabled != undefined && !enabled)
					return;
				var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
				var desc1 = new ActionDescriptor();
				var ref1 = new ActionReference();
				ref1.putProperty(cTID('Clr '), cTID('Clrs'));
				desc1.putReference(cTID('null'), ref1);
				executeAction(cTID('Rset'), desc1, dialogMode);
			};

			step1();      // Make
			step2();      // Set
			step3();      // Set
			step4();      // Make
			step5();      // Set
			step6();      // Make
			step7(true, true);      // Stop
			step8(true, true);      // Stop
			step9();      // Select
			step10();      // Reset
		},
};



//=========================================
//Matla_t_r_c_Pudra.main
//=========================================


//Matla_t_r_c_Pudra.main = function () {
// Matla_t_r_c_Pudra();
//};

//Matla_t_r_c_Pudra.main();

//EOF

//"Matlaştırıcı Pudra"
//EOF
