8 Replies Latest reply on Nov 26, 2014 10:28 AM by Chuck Uebele

    How to change the FILL OPACITY of a group?

    gregbenz Level 1

      When I use Script Listener to record changing the fill opacity of a group, I get the following code.  However, while this code was generated while a group was selected, I get an error when trying to execute this with a group selected, "General Photoshop error occurred.  This functionality may not be available in this version of Photoshop."  So, the code straight from Script Listener won't replay the action it recorded.  (note that this will correctly change the fill opacity of an art layer, just not a group).  Anyone know another way to change this?  (note that I can change the opacity, but am specifically looking to change the fill opacity).  Thanks!


      var idsetd = charIDToTypeID( "setd" );

          var desc139 = new ActionDescriptor();

          var idnull = charIDToTypeID( "null" );

              var ref105 = new ActionReference();

              var idLyr = charIDToTypeID( "Lyr " );

              var idOrdn = charIDToTypeID( "Ordn" );

              var idTrgt = charIDToTypeID( "Trgt" );

              ref105.putEnumerated( idLyr, idOrdn, idTrgt );

          desc139.putReference( idnull, ref105 );

          var idT = charIDToTypeID( "T   " );

              var desc140 = new ActionDescriptor();

              var idfillOpacity = stringIDToTypeID( "fillOpacity" );

              var idPrc = charIDToTypeID( "#Prc" );

              desc140.putUnitDouble( idfillOpacity, idPrc, 65.000000 );

          var idLyr = charIDToTypeID( "Lyr " );

          desc139.putObject( idT, idLyr, desc140 );

      executeAction( idsetd, desc139, DialogModes.NO );