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

After Effects Script: Inherit multiple character styles from parent text to child

New Here ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

I have an After Effects script that copies the style and text of a text layer to another text layer in a separate comp. This works great if the parent text layer only contains one style, but I need one that is half bold and half normal. Is there a way for the script to loop through each character in the parent and apply that style to the corresponding character in the child?

 

This is what I have now - I found it in this tutorial: tutorial 

var parentText = comp("Precomp - People").layer("Single Title").text.sourceText;
var parentStyle = comp("Precomp - People").layer("Single Title").text.sourceText.style;
parentStyle.setText( parentText );

 

TOPICS
Expressions , Scripting

Views

207

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
no replies

Have something to add?

Join the conversation