3 Replies Latest reply on Aug 26, 2014 4:19 AM by lornaimw

    Copying layer properties

    lornaimw Level 1

      Hi all

       

      I've had this frustration a while and figured there was nothing I can do about it as I don't want to buy a script just for this if that's the case, but here goes.

       

      If two layers are both at 100 percent scale, but one layer is 100x100 px and one is 200x200 px, is there a way that I can make one match the other?

       

      I know you can shift parent, but that seems to only relate to scales, etc, I mostly want to use this in the way that I have a shape for a piece of video to go in, normally a vector from illustrator as a place holder, I then want to copy the shape and parent to this.

       

      Is this possible?

       

      Thanks for any help!

        • 1. Re: Copying layer properties
          lornaimw Level 1

          Any ideas anyone? This would be mega useful.

          • 2. Re: Re: Copying layer properties
            Rick Gerard Adobe Community Professional & MVP

            Expressions can return the height and width of a layer. You can write an expression that divides the target layers height and width by the source layer's height and width. There are two ways to write this expression. One using an array, one using individual values.

             

            Here's option 1:

            sLayer = [width, height]; // source layer

            tLayer = [thisComp.layer("target layer").width, thisComp.layer("target layer").height]; // target layer

            [tLayer[0] / sLayer[0], tLayer[1] / sLayer[1]] * 100

             

            Here's option 2:

            tlWidth = thisComp.layer("target layer").width;

            tlHeight = thisComp.layer("target layer").height;

            slWidth = width;

            slHeight = height;

            sx = tlWidth / slWidth;

            sy = tlHeight / slHeight;

            [sx, sy]*100

             

            Apply either expression to the source layer's scale property. The outside dimensions of the source and target will now match. If the 'target layer' is the parent the source layer will react normally. If the source layer

            is the parent you cannot adjust the scale of the pair without modifying the expression with a value + statement. Here's a sample CS6 project.

            • 3. Re: Copying layer properties
              lornaimw Level 1

              This is perfect Rick and exactly what I needed. You are a star Thank you very much.