12 Replies Latest reply on Mar 26, 2015 12:30 PM by Mikaeru69

    How to change only the fill color style of the layer

    васяс27353513

      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.