3 Replies Latest reply on Dec 7, 2017 1:43 PM by SquareEyz

    Text tracking amount contoled by source text via expressions

    SquareEyz Level 1

      Hi all,

      I've spent a pretty stupid amount of time trying to figure this out, and I'm guessing someone here knows exactly how to do this:

       

      I need to setup a bunch of Live Text Templates in AE, to be used by editors in Premiere.

      I need to provide extra controls that do not exist off the bat, and I plan to do so via non-visible text layers that drive numeric data linked to the properties I want to control.

       

      The basics of what I'd need:

       

      Text Tracking that can support negative and positive values. '0' is pre-entered

      Text Scale- which could be the layer scale

      Layer Position in X,Y

       

      These are the current minimum controls I'm looking for, and I know they are pretty humble goals. But I can't figure out the syntax of how to get my typed "0" to be read as the value needed to drive the Text tracking, specifically. I have never learned JS, and have sub-rudimentary expression skills.

       

      I'd love to see a set of these type of Live Text Template specific expression controls (Driven solely by text entry in Premiere) posted somewhere online, as I have NOT been able to find them.

       

      Many thanks!

      D

      PS after deliberation and tests, I have made the decision not use Essential Graphics .MOGRT workflow (as disappointing as that is), as the current implementation of EG is not suitable for administering graphics templates on a facility scale.

      This was put most concisely and constructively in this thread Motion Graphics - Limits & Frustrations when put to actual use.

        • 1. Re: Text tracking amount contoled by source text via expressions
          Mylenium Most Valuable Participant

          You use parseInt() and parseFloat() to derive values from text inputs, but such advanced stuff tends to not  work inside templates, anyway.

           

          Mylenium

          1 person found this helpful
          • 2. Re: Text tracking amount contoled by source text via expressions
            SquareEyz Level 1

            Thank you very much @mylenium!

             

            After flailing around, I was able to get the results I need (without really understanding how JS works)..

             

            For anyone interested, here is how that looks:

            In the AE comp, I have a text layer ("Name Here") that is a text field that editors can modify within Premiere.

             

            Above it here, I have a control layer ("line spacing"), which uses entered numeric values via source text, to drive the line spacing animator in the Name Here text layer. (PS you have to add that via the "Animate" toggle down for a text layer)

            AE Comp.png

             

            I thought parseInt() would be lighter on AE, as it only works with whole numbers.

             

            So I option clicked on the tracking amount stopwatch, pasted in parseInt() to the expression field, put my cursor in between the brackets, then pickwiped the source stopwatch, producing in my case:

            parseInt(thisComp.layer("line spacing").text.sourceText)

             

            The default value I entered into the text field is 0.

             

             

            So then in Premiere, here is how that looks;

             

            Premiere Text entry interface.png

             

            I typed in 50 for a line spacing value (for illustration purposes), and it updated the AE comp, producing this image in the premiere timeline:

            Premiere timeline.png

             

            My next question involves a similarly simple method for adjusting scale values. I'm assuming that parseFloat() will be best for this, as I think folks will want that level of control.

             

             

            Can Anyone save me and everyone else some time, and write up a simple expression to do this?

             

             

            If so I can produce a similar walk thru with screen grabs when I get a chance.

             

            Again, I would LOVE to start making a recipe book for these types of workflows to try and save others the ridiculous amount of wasted time I've spent just trying to rig up something so simple.
            Any ideas from anyone about the best way to do that?

             

            Best,

            David

            • 3. Re: Text tracking amount contoled by source text via expressions
              SquareEyz Level 1

              I got some help from a member of our web team with a comp sci BG

               

              To extract numeric values from the text layer, and drive scale values in another text layer, use this expression:

               

              L1 = thisComp.layer("your text layer").text.sourceText;

              [parseFloat(L1),parseFloat(L1)];

               

              This expression gets applied to "scale" animator, using the same process noted in the above thread.

               

              I hope this helps sombody!