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

displayed a certain number of text lines from text layer in child composition

New Here ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

There is a text layer#1 with 6 text lines. It is necessary that 1st, 2nd and 3d text line from layer#1 be displayed on a text layer#2, and 4th, 5th and 6th text line be displayedon a text layer#3 .And generally speaking, text layer#1 shoud be precomposed.

 

thanx)

TOPICS
Expressions , How to

Views

256

Translate

Translate

Report

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
Participant ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

when you say 6 text lines, you mean there is a return between each line of text in that layer ? and you want the first lines to appear as 1 line in a different text layer, and then the next 3 to appear on the a different layer. and what hppens if there is 7 lines of text ?

Votes

Translate

Translate

Report

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
Participant ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

for example this would combine all 6 onto one layer ( now we need to figure out how to stop at 3, etc.... )

 

thisComp.layer("text 1").text.sourceText.replace(/\r/g, " ");

Votes

Translate

Translate

Report

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
Participant ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

this is for the first 3

 

a=thisComp.layer("text 1").text.sourceText.split('\r')[0];
b=thisComp.layer("text 1").text.sourceText.split('\r')[1];
c=thisComp.layer("text 1").text.sourceText.split('\r')[2];
a+" "+b+" "+c

Votes

Translate

Translate

Report

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
Participant ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

and

 

d=thisComp.layer("text 1").text.sourceText.split('\r')[4];
e=thisComp.layer("text 1").text.sourceText.split('\r')[5];
f=thisComp.layer("text 1").text.sourceText.split('\r')[6];
d+" "+e+" "+f

Votes

Translate

Translate

Report

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
Participant ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

LATEST

if the text layer is precomposed just replace

thisComp.layer("text 1")

with

comp("precomp").layer("text 1")

Votes

Translate

Translate

Report

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