Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Source text for displaying thisLayer.sourceRectAtTime(time).width

  • Source text for displaying thisLayer.sourceRectAtTime(time).width

    Posted by Geoff Vane on October 12, 2020 at 5:02 pm

    Stupid expression problems can cause hours in delay.
    I have no means of reading variables other than putting them into a source text with an expression.

    These here work fine as a source text expression:

    thisLayer.name

    thisLayer.position or thisLayer.position[0] if you wanna go specific.

    Why doesn’t this work:

    thisLayer.sourceRectAtTime(time).width

    Whatever I try, I can’t get the source text to reveal this value. It just switches back to the default source text without any error.

    This seriously delays my debugging of a coding error.

    Help!

    Geoff Vane replied 5 years, 10 months ago 1 Member · 1 Reply
  • 1 Reply
  • Geoff Vane

    October 12, 2020 at 6:17 pm

    I found the culprit: a text layer can’t examine its own size and publish that with its source text property.
    This would be something of a recursive problem.
    When I let the text layer take another layer its size, it could publish that.

    This way I found out my problem sat in another nice nasty: the update of the if-then structure.

    If-then-else is now a must.

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