Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Source Text Split() method

  • Source Text Split() method

  • Nick Kennedy

    June 22, 2021 at 8:43 am

    Hallo, I’m building a Lower Third for a talkshow. Sometimes the last name has to be in Orange somtimes it has to remain White. To build an Essential Graphics Template for Editors, I thought I was being really clever creating one Text layer to input the full name and then use the Split()[0] method to send out the First name and second name to the respective layers. This works just fine. My Problem is it all messes up when the guest in the talkshow has three or more names for example Ursula Von der Lyen, or if someone has a Doctor Title that we have to put in the name e.g. Dr. Frank Steinmeier or even worse Prof. Dr. Winfried Stöcker. Then my oh so clever expression really messes up and I don’t know how I could fix this. Any tips or hints would be most appreciated. Thanks

  • Trent Armstrong

    June 22, 2021 at 11:25 am

    Nick! You are certainly clever. Don’t ever question that part!

    Two things to try:

    1) Leave an instruction for the editor to add an underbar to the name for the split like “Dr. Nick_Von Kennedy”.

    name.split(“_”)

    2) You could add a text animator for making first/last transparent and give the editor the ability to offset the start/end index of the text on each of the layers. I think you could do that with just one extra number in the Essential Graphics Panel.

    Trent

  • Nick Kennedy

    June 22, 2021 at 12:29 pm

    Hi Trent, thanks so much for your quick answer! If i use your first solution would the editors always have to use an underbar to seperate also 2 names? And if you have time could you please expand on your second solution cause I didn’t understand. Thanks again for your help!

  • Trent Armstrong

    June 22, 2021 at 1:53 pm

    Nick,

    I tried the Text Animator situation, and it didn’t work like I had expected. SOOOOO I have an aep here for you that uses the same idea but in the sourceText of the two separate layers instead.

    Adjust and improve as needed!

    Trent

  • Nick Kennedy

    June 22, 2021 at 2:11 pm

    Wow! Thanks for taking the time to try this out, but its not quite working. First of all if the expression takes the name from the Layer name, how can I incorporate that into an essential graphics template. and when I change the offset value things start disappearing. Any idea whats going on? Thanks again for your help

  • Jean Baptiste

    June 22, 2021 at 4:04 pm

    Hello Nick,

    I was inspired by Trent’s answer. You can download here a AE project with a proposition.
    https://github.com/jybedesign/after-effects-name-splitter

    This solution is :
    – Using “Essential graphic” panel to set the First name & Last name in the Precomp.
    – Using a “marker comment” to set the name by the user in the main comp (with an underscore to separate the two elements).
    – Possibility to ignore the marker and simply type the names in the “Essential Properties” expressions.

    Hope it will help.

  • Nick Kennedy

    June 23, 2021 at 1:31 pm

    Hi Jean, thank you so much for taking the time to try this out. I had hoped to be able to provide the editors with one input for full name but I don’t think this will be possible. I will have to create, like you did in the precomp, input fields for First and last Names. Thanks again for helping, Cheers, nick

  • Trent Armstrong

    June 23, 2021 at 2:16 pm

    Nick,

    I’m not sure if it helps you, but that name offset slider should only be whole numbers. That could help you.

    Also, just connect the Essential Graphics Panel to a text field that is hooked up through expressions.

    Trent

Viewing 1 - 8 of 8 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy