Skip to main content
Inspiring
February 13, 2020
Answered

Refer to "thisContent" in a shape layer content expression?

  • February 13, 2020
  • 2 replies
  • 796 views

Is there an equivalent "thisContent", comparable to "thisLayer", for an expression on the content of a shape layer?

 

For example, I'd like to modify the scale of a rectangle and want to look at other properties of the rectangle, such as size and position.

This topic has been closed for replies.
Correct answer Mylenium

No. You have to link the actual properties or construct a look-up that combs through other properties relative to the one the expression is applied to.

 

Mylenium

2 replies

Community Expert
February 13, 2020

sourceRectAtTime() will look at the total area of all of the elements on a shape layer and return the width, height, top, and left values for all of the shapes. 

 

A parametric shape like a rectangle or ellipse will have size values you can use, but a shape drawn with a path does not. As long as a property can have a keyframe applied to it you can use that value in an expression. 

 

If all you want to do is modify the scale of a rectangle and have that change the size or position you can just so some simple math using expressions. If you are new to expressions let us know. It takes a while to figure out how they work. 

 

If you can provide some specific design goals for your project we can give you a better idea. I use expressions all the time to modify the size or position of layers based on scale or distance from a camera. Let us know exactly what you want to do and we can probably help.

Mylenium
MyleniumCorrect answer
Legend
February 13, 2020

No. You have to link the actual properties or construct a look-up that combs through other properties relative to the one the expression is applied to.

 

Mylenium