2 Replies Latest reply on Sep 29, 2010 12:41 PM by BJamieson2215

    Create action to Drag and drop curve layers from one file to another?

    BJamieson2215 Level 1

      Hey, everyone!

       

      I am trying to record a Photoshop Action that...

      1. Opens a source file

      2. Selects specific curve layers

      3. Brings the curve layers to a destination file.

       

      I have tried to just drag & drop the selected layers from the source to destination document, but the Action only records "select previous document" without actually transferring the curves.

       

      I can right-click on the layers I wish to duplicate and select "Duplicate Layers..." but it locks the Action into a specific destination AND it won't allow the menu to pop up.

       

      I could look at this a different way in which I save every Curves layer as a Preset and have the Action just create the layers instead of dragging them from a source file. However, I have a prohibitive number of these darned layers and most of them have "Blend Ifs" on them as well, and that would take lots of time to produce.

       

      Any suggestions?

       

      Thanks,

      Bruce

       


        • 1. Re: Create action to Drag and drop curve layers from one file to another?
          Michael L Hale Level 5

          The function below with copy a layer from the activeDocument( selected doc and layer ) to the next open document. If only two documents are open it doesn't matter what order the documents are in. i.e. with only two open docs next and previous doc is the same doc.

           

          function copyLayerToNextDoc() {
              var desc = new ActionDescriptor();
                  var ref = new ActionReference();
                  ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
              desc.putReference( charIDToTypeID('null'), ref );
                  var ref2= new ActionReference();
                  ref2.putOffset( charIDToTypeID('Dcmn'), 1 );
              desc.putReference( charIDToTypeID('T   '), ref2 );
              desc.putInteger( charIDToTypeID('Vrsn'), 5 );
              executeAction( charIDToTypeID('Dplc'), desc, DialogModes.NO );
          };
          
          1 person found this helpful
          • 2. Re: Create action to Drag and drop curve layers from one file to another?
            BJamieson2215 Level 1

            Thanks, Michael! That worked great. It proves to me I need to learn a bit more about what scripting can do for me.

             

            -Bruce