4 Replies Latest reply on Jun 13, 2013 11:13 PM by vinoth_mannu

    Transform selection increase problem

    vinoth_mannu Level 1

      Hi ALL,

       

      I am trying to apply transform on some selected objects 10 % increase, i could see the part are moved from the orginal place.

       

      If we try to do select the individual object this works fine.

       

      Any idea

       

      var idTrnf = charIDToTypeID( "Trnf" );

          var desc6 = new ActionDescriptor();

          var idnull = charIDToTypeID( "null" );

              var ref3 = new ActionReference();

              var idLyr = charIDToTypeID( "Lyr " );

              var idOrdn = charIDToTypeID( "Ordn" );

              var idTrgt = charIDToTypeID( "Trgt" );

              ref3.putEnumerated( idLyr, idOrdn, idTrgt );

          desc6.putReference( idnull, ref3 );

          var idFTcs = charIDToTypeID( "FTcs" );

          var idQCSt = charIDToTypeID( "QCSt" );

          var idQcsa = charIDToTypeID( "Qcsa" );

          desc6.putEnumerated( idFTcs, idQCSt, idQcsa );

          var idOfst = charIDToTypeID( "Ofst" );

              var desc7 = new ActionDescriptor();

              var idHrzn = charIDToTypeID( "Hrzn" );

              var idRlt = charIDToTypeID( "#Rlt" );

              desc7.putUnitDouble( idHrzn, idRlt, 0.000000 );

              var idVrtc = charIDToTypeID( "Vrtc" );

              var idRlt = charIDToTypeID( "#Rlt" );

              desc7.putUnitDouble( idVrtc, idRlt, 0.000000 );

          var idOfst = charIDToTypeID( "Ofst" );

          desc6.putObject( idOfst, idOfst, desc7 );

          var idWdth = charIDToTypeID( "Wdth" );

          var idPrc = charIDToTypeID( "#Prc" );

          desc6.putUnitDouble( idWdth, idPrc, 110.000000 );

          var idHght = charIDToTypeID( "Hght" );

          var idPrc = charIDToTypeID( "#Prc" );

          desc6.putUnitDouble( idHght, idPrc, 110.000000 );

          var idLnkd = charIDToTypeID( "Lnkd" );

          desc6.putBoolean( idLnkd, true );

      executeAction( idTrnf, desc6, DialogModes.NO );

       

      Regards,

      Vinoth

        • 1. Re: Transform selection increase problem
          pixxxel schubser MVP & Adobe Community Professional

          Does this works for you? (I hope, I understand you right)

           

           

          // CopyPasteResize.jsx
          // http://forums.adobe.com/thread/1230010?tstart=0
          // copy, paste and resize to 110%
          // a selection is necessary and the layer can not be blank
          var aDoc = app.activeDocument;
          var Sel = aDoc.selection;
          Sel.copy ();
          aDoc.paste();
          aDoc.activeLayer.resize(110,110, AnchorPosition.MIDDLECENTER)
          

           

          Have fun.

          • 2. Re: Transform selection increase problem
            vinoth_mannu Level 1

            Awesome!!!

             

            It works well and excellent thinking,

             

            When i run through ESTK it works fine. but when i created Panels through adobe configurator i could see error

             

            Untitled.png

            Regards,

            Vinoth

            • 3. Re: Transform selection increase problem
              pixxxel schubser MVP & Adobe Community Professional

              Hmmh?

              You have not spoken of use in a panel previously.

               

              Some conjectures:

               

              Is "Transform" the correct adobe configurator syntax for "resize"? (I only have CS3 and that's why no configurator)

              And have you implemented a selection? Copy and paste are working in your panel (standalone)?

              • 4. Re: Transform selection increase problem
                vinoth_mannu Level 1

                Hi,

                 

                Is "Transform" the correct adobe configurator syntax for "resize"? (I only have CS3 and that's why no configurator)

                And have you implemented a selection? Copy and paste are working in your panel (standalone)?

                 

                Sorry, No idea on the above content.

                 

                i could see the images when we paste it moves a little, but when i do it on individually this is perfect.

                 

                I have also used cut and paste both gives me the same result.

                 

                I think one solution, which is little bit over imagining.

                 

                Step 1 -- Marquee tool selected first object are placed as layer 1, selected second object are placed as layer 2 and so on.

                 

                Step 2  ---  "aDoc.activeLayer.resize(110,110, AnchorPosition.MIDDLECENTER)"

                 

                Step3 --- flatten the document layer

                 

                Step4 --- Close

                 

                Can this be done through scripting.

                 

                Regards,

                Vinoth