Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Making text border follow the source text keyframes

New Here ,
Nov 11, 2024 Nov 11, 2024

I've been doing subtitle layers according to this tutorial:
https://www.youtube.com/watch?v=R2a-_flGOAk
I neded dynamic text boxes for multiline text.
This is working otherwise, but if I want to be able to change the source text of the main text layer in a way that the borders width scales with the main text. Now it only picks the width of the main text in the last keyframe. 

The borders are parented to the main layer. 
In the border layer source text i have expression:
borderText = "g\r".repeat(thisLayer.parent.text.sourceText.split("\r").length - 1); borderText += "g" ; thisLayer.parent.text.sourceText.style .setText(borderText) .setFont("Webdings") .setFontSize(1) .setAllCaps(false) .setSmallCaps(false) .setFillColor(style.fillColor)

and in the scale property I have added:
margins = [2, 1.7] * thisLayer.parent.text.sourceText.style.fontSize; x = linear(thisLayer.parent.sourceRectAtTime(outPoint - framesToTime(textIndex) - inPoint).width + margins[0], 0, 5000, 0, 100); y = linear(margins[1], 0, 5000, 0, 100); [x,y]

I can't seem to figure out how i could make the right reference here

TOPICS
Expressions
80
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation