The sourceRectAtTime feature is commonly used to connect one layer’s dimensions to control another layer. For example, imagine a box with the words “My soul is a hidden orchestra” on top of it. You can use sourceRectAtTime to make the box expand or contract based on the text that is on top of it.
Below is the generic expression:
sourceRectAtTime(t = time, includeExtents = false)
Let’s look at the second parameter,
includeExtents = false. What does this mean exactly?
This parameter is asking: Do you want to include the bounds of the paragraph box?
In this example, I’ve rigged the text “Fernando Pessoa” to always have an x position value directly to the right edge of the quote on the left. The cyan line represents the rightmost edge of the quote.
includeExtents = true, “Fernando Pessoa” will always be at the right edge of the paragraph box, because I’ve set it to
true, meaning: yes, please follow the bounds of the paragraph box.
includeExtents = false, the right text will always be at the farthest right edge of the text, because
false means: no, please do not follow the right edge of the paragraph box.
Note that if you don’t specify any parameters, i.e., if you have sourceRectAtTime(), the default value of includeExtents is false.
What would make
includeExtents = true useful? One reason is if you want to make sure that the layer on the right is not sensitive to the size of the text on the left. Under this scenario, if you change the left layer’s text size in the Character Panel, that will not affect the right layer because you’ve already set the bounds of the paragraph box. And the paragraph dictates where the right layer will be.