Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

How to change only the fill color style of the layer

$
0
0

function ftn1() {

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

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

 

    var desc4 = new ActionDescriptor();

        var ref2 = new ActionReference();

        ref2.putProperty( cTID('Prpr'), cTID('Lefx') );

        ref2.putEnumerated( cTID('Lyr '), cTID('Ordn'), cTID('Trgt') );

    desc4.putReference( cTID('null'), ref2 );

        var desc5 = new ActionDescriptor();

        desc5.putUnitDouble( cTID('Scl '), cTID('#Prc'), 100.000000 );

            var desc6 = new ActionDescriptor();

            desc6.putBoolean( cTID('enab'), true );

            desc6.putEnumerated( cTID('Md  '), cTID('BlnM'), cTID('Nrml') );

            desc6.putUnitDouble( cTID('Opct'), cTID('#Prc'), 100.000000 );

                var desc7 = new ActionDescriptor();

                desc7.putDouble( cTID('Rd  '), 129.001923 );

                desc7.putDouble( cTID('Grn '), 129.001923 );

                desc7.putDouble( cTID('Bl  '), 129.001923 );

            desc6.putObject( cTID('Clr '), cTID('RGBC'), desc7 );

        desc5.putObject( cTID('SoFi'), cTID('SoFi'), desc6 );

    desc4.putObject( cTID('T   '), cTID('Lefx'), desc5 );

    executeAction( cTID('setd'), desc4, DialogModes.NO );

};

 

This code change current layer styles, i want to change only fill color style.

Other style must not change. Maybe you help me with manual for ActionDescriptor() or some samples.

Sorry for my english.


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>