Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects AE Expressions Paragraph textfields width

Tagged: 

  • AE Expressions Paragraph textfields width

    Posted by Tudor Baican on May 24, 2021 at 1:16 am

    Hello Friends,

    my little script should set the text width of my paragraph textfields.

    So far so good, it seems to work but it compute very very slow. If I select just two text objects I wait about 5 sec for the process.

    Someone here who can optimize that?

    Thanks

    Tudor

     

    ...
    for (var i = 0; i < mySelectedLayers.length; i++) {
            if(mySelectedLayers[0] instanceof TextLayer){
                var myText = mySelectedLayers[i].property("Source Text");
                var myTextDocument = myText.value;
                if (myTextDocument.boxText == true){
                    myTextDocument.boxTextSize = [300, 300];
                }else{
                    alert("Convert your Text Layer to Paragraph Text!");
                };
                myText.setValue(myTextDocument);
            };
        };
    Tudor Baican replied 4 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Walter Soyka

    May 24, 2021 at 10:03 am

    This code looks to be just about as compact as it can be, and it runs nearly instantaneously on my system, even with a lot more layers selected.

  • Tudor Baican

    May 25, 2021 at 6:37 pm

    @Walter Soyka > Thanks for testing it.

    <font face=”inherit”>I seems that if the </font><font face=”inherit”>paragraph textfields, consisting of a </font>text<font face=”inherit”> section with many words > 30 it run very slow. </font>

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