Skip to main content
Participant
Mar 12, 2013 1:02 AM UTC
Question

Adding an expression to Source Text breaks alignment?

This is a big WTF for me.

I have a text layer. I center-align the text in it. The moment I add an expression to its Source Text (even the default text.sourceText) it becomes left-aligned and REFUSES to go to center-aligned. Huh?! This seems like a very common thing, so what am I missing? Is there something else I need to do in the expression to get it to be center aligned?

Thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.

13 replies

Participant
Oct 15, 2024 3:01 PM UTC

I had the same issue recently. I have text that I want to set dynamically based on an expression control in another composition. The paragraph align was stuck on centered. If I removed the expression from the Source Text, I could change the alignment, but as soon as I added the expression back in, the alignment went back to centered. I need it to be left aligned.

 

I followed @leif_hanson's advice, which was to clear out the manually-entered text for the text layer. This did the trick! I was able to make manual changes to the paragraph alignment. 

Translate
emmab86471458
Known Participant
Jun 6, 2024 1:43 PM UTC

Hi there, I'm still having that issue on After Effects 2023 ! 😞

Translate
Inspiring
Jul 9, 2023 5:11 PM UTC

It's 2023 and this is still an issue! Adobe! Please fix!

Translate
Participant
Jan 8, 2024 8:55 PM UTC

2024 and still broken. Adobe is worthless.

Translate
Participant
Apr 6, 2015 11:36 PM UTC

Oh man.  Hopefully you figured this out already, but it was driving me crazy too.  But I think I've got it figured out.  I added a sourceText expression and was unable to change the alignment, but after much futzing I found that by deleting the existing text in the text layer I was applying the expression to, I could change the alignment without any issues.  I hope that's clear. 

Translate
Participant
Jun 10, 2022 4:18 PM UTC

I love you

Translate
Jun 6, 2013 1:33 PM UTC

Experiencing the same issue here with CS6: text-alignment breaks after adding an expression on the source text.

Any solution found already?

Translate
Inspiring
Jun 7, 2013 10:27 AM UTC

It depends on the expression you're using. Post it here to see if we can see what's causing the issue.

Translate
Jun 11, 2013 12:56 PM UTC

I use this expression:

type = text.sourceText;

m = thisComp.marker.nearestKey(time);

sentences = type.split("\r");

n = m.index;

if (time < thisComp.marker.nearestKey(time).time) {n = n-1}

if (n>=sentences.length){n=sentences.length-1}

if (n<1){n=1}

line = sentences;

line

When I edit the text, it's perfectly aligned, but when the text gets split up by the expression, everything aligns to the left.

Hope you have an idea why?

Translate
Dan Ebberts
Community Expert
Community Expert
Mar 12, 2013 1:39 AM UTC

I'm not seeing that behavior (the expression text stays center-justified). What version of AE?

Dan

Translate