Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Reset next text horizontal scale

  • Reset next text horizontal scale

  • Otávio Nascimento

    February 5, 2023 at 12:56 am

    I’m using this script to change the text horizontal scale, but when I create another text in the comp, it set to the previous horizontal scale. How can I make changes to text and a new text will be in normal scale?

    function TextHorizScale(myLayer) {
        var myLayer = myLayer;
    var textProp = myLayer.property("Source Text");
    textDocument = textProp.value;
    textDocument.horizontalScale = 0.5;
    return textProp.setValue(textDocument);

    I tried this but didn’t work:

    var fixCharacter = app.project.activeItem.layers.addText("Fix Text");
    textReset(fixCharText);
    fixCharText.remove();
    function textReset(myLayer) {
    var myLayer = myLayer;
    var textProp = myLayer.property("Source Text");
    textDocument = textProp.value;
    textDocument.horizontalScale = 1;
    return textProp.setValue(textDocument);
    }
  • Andrei Popa

    February 6, 2023 at 7:53 am

    I am using the first part of your script and it works fine(Adobe After Effects 2022 and 2023). Text gets to 0.5 and the horizontal scale does not change for the next layer I am creating. Maybe the horizontal scale was set to 0.5 before you ran the script.

    However, some error that I see in your code is that you create a text layer with the variable name “fixCharacter” and then try to use it with “fixCharText”.

Viewing 1 - 2 of 2 posts

Log in to reply.

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