Easy Text Box - Q&A | sourceRectAtTime Expression (2/2)

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

Комментарии • 82

  • @TonyMuzzatti
    @TonyMuzzatti 2 года назад +8

    The moment I type that first "const" expression in I get an error: "Variable name expected"...what am I doing wrong?

    • @MographMindset
      @MographMindset  2 года назад +6

      In After Effects go to File > Project Settings > Expressions, and change the Expressions Engine from Legacy ExtendScript to JavaScript

  • @learningtoday1
    @learningtoday1 2 месяца назад +2

    After 2 years you are still saving lives❤

  • @JakeInMotion
    @JakeInMotion 2 года назад +14

    My mind is blown. My socks are off. My hair is back. My jaw is on the floor.

  • @cordel_ringani
    @cordel_ringani 2 года назад

    Wow! Just when you thought you knew AE, someone comes and proves you wrong. I've been humbled. 👏🏾 👏🏾 👏🏾 🔥 🔥 🔥

  • @junda17
    @junda17 Год назад

    duuuuudeeee, i've watched a ton of tutorial on how to do this stupid ass box behind my text, and always the padding was wrong, when I added a new line of thext tha padding was multiplying and not working until this tut helped me! thank you so much.

  • @jasonrodriguezarias3273
    @jasonrodriguezarias3273 2 года назад

    It worked for my 64-bit PC. Thanks a lot.

  • @bellasun4549
    @bellasun4549 2 месяца назад

    Thanks for the tutorial!! wonder how to align the text box tail with the text box tho?

  • @Anonymous-cn6zl
    @Anonymous-cn6zl 4 месяца назад

    That cute dog though. Thanks for the tutorial ❤❤❤

  • @Animotion1
    @Animotion1 2 года назад

    Oh my god this is a tutorial that I didnt know I need!! Thank you so much for sharing. Now I don't have to resize my shortcut text boxes manually anymore in my videos 😭💜

  • @ezehughes
    @ezehughes Год назад +1

    Contenido de calidad. Gracias!

  • @spiritualindia5830
    @spiritualindia5830 2 года назад

    aah, i just got into making soft rn and tNice tutorials is so helpful and your voice is so sootNice tutorialng btw! thanks for tNice tutorials tutorial

  • @alfonsoledesma5022
    @alfonsoledesma5022 2 года назад

    Thankx for breaking it down.. great tutorial for b

  • @kaushalkakadiya4494
    @kaushalkakadiya4494 2 года назад

    not know , but just know you've affected my life, and apparently tens of thousands of others, in an imnsely positive way. Thank you

  • @filipecaldasmotion
    @filipecaldasmotion Год назад

    Thank you. It helped a lot!!

  •  2 года назад

    Keep doing these things, don't stop! It is nice!

  • @ArthurGanem
    @ArthurGanem Год назад

    This is truly a perfect tutorial. Thx a lot !

  • @isaacanani
    @isaacanani 2 года назад

    Will be following

  • @dominiquesolmarin9608
    @dominiquesolmarin9608 2 года назад

    TNice tutorials person speaks the truth, the whole truth and notNice tutorialng but the truth

  • @arts9466
    @arts9466 2 года назад

    It's very helpful man. Upload more tips videos on after effects.

  • @bkaextream5537
    @bkaextream5537 2 года назад

    nice tuto, I had the sa issue

  • @MyTrycs
    @MyTrycs 2 года назад

    It was the sa for , In the GMS I switched the "Program" to "Analog app 1 TE"

  • @capilicyril8994
    @capilicyril8994 2 года назад

    YO THANK YOU SO MUCH

  • @afroditabelen1436
    @afroditabelen1436 2 года назад

    Bien explicado y 100% funcional, ya tengo el programa en modo profesional. ¡Gracias!

  • @deyluvlathan5085
    @deyluvlathan5085 2 года назад

    Health to you, brother!

  • @dianav5118
    @dianav5118 Месяц назад

    Hello! Amazing video, I was wondering how you could add a stroke to the text? Currently it only adds a stroke to the box as a whole. Thank you!!

    • @MographMindset
      @MographMindset  Месяц назад

      @@dianav5118 open Window > Character panel and then increase the stroke width number

  • @danieltuma5834
    @danieltuma5834 2 года назад

    Sa here bro had everytNice tutorialng sitting for half a year before I started to dive in

  • @lushprod
    @lushprod 5 месяцев назад

    Is there a way to animate the box so the type animates with the shape of the box? like a bento box?

  • @davehedric1543
    @davehedric1543 Год назад

    Thank you for this tutorial!!
    Another question: Is there a way to create a write-on animation with this text box? i tried to do it with text animators opacity and it didn't work as planned since the box ignores the letters opacity setting. is there a solution to this in expression form or otherwise?

    • @MographMindset
      @MographMindset  Год назад

      Use the "Blinking Cursor Typewriter Console" effect preset that is included with After Effects. It will animate the Source Text property + Text Animators and then the box will follow correctly

  • @viviancantillon97
    @viviancantillon97 Год назад +1

    Hi!
    "Variable name expected" is off when i change to JavaScript like you said but i have another expression that seems to only work in the Legacy ExtendScript.
    Here is the expression i have :
    if(thisComp.layer("CTRL COLORS").effect("COLORS")("ADBE Slider Control-0001")==1)100 else 0;
    And it says "Error : SyntaxError : Unexpected token 'else'
    Can you help me ? I'm not familiar with expressions but i want to keep the text box follows the text and anchor point but also be able to change the color of text with a slider control.

    • @MographMindset
      @MographMindset  Год назад +1

      This is a common problem because After Effects is so old, and people copy+paste old expressions from online forums and videos. The older syntax is unfortunately incompatible with the new JS engine.
      To fix it, you just have to update the if/else syntax with curly braces {}.
      Like this:
      if (thisComp.layer("CTRL COLORS").effect("COLORS")("ADBE Slider Control-0001")==1) {100} else {0};

    • @viviancantillon97
      @viviancantillon97 Год назад

      @@MographMindset Thanks a lot! You recommend to stay in JavaScript all the time and adapt expression from Legacy ExtendScript then ?

    • @MographMindset
      @MographMindset  Год назад +1

      @@viviancantillon97 100%

  • @WalkAway273
    @WalkAway273 2 года назад

    Thank you so much for the tutorial! this really helps me.
    But is there any way to move only a text without moving the box or leaving space on only one side?
    In my work, I use long text and want to leave the space only on top.
    I try to scale and type but it ends up with a HUGE box.

    • @WalkAway273
      @WalkAway273 2 года назад

      And I struggle with animated only text without the box moving with this code 🥲

  • @nguyenquynhnhu6026
    @nguyenquynhnhu6026 2 года назад

    Sa af, I have so so many soft and lodies in my head and I have absolutely no clue how to put them into soft or any way to make

  • @grinnlock
    @grinnlock 2 года назад

    Great Tutorial man !
    I am using the padX and padY as an a way to open and close the text since the stroke doesnt deform, but it only pads from the center.
    Is there a way to pad from the sides, and not just the center ?
    Anyway you tutorial helped me allot at my work. Thank you so much

    • @MographMindset
      @MographMindset  2 года назад +1

      On the Text Box Layer look below "Size" (and above "Roundness") to find the Rectangle's "Position" property. Write:
      const [x,y] = content("Rectangle 1").content("Rectangle Path 1").size.value;
      [x/2, 0]
      This moves the shape's anchor point to the left edge (for the right edge, change "x/2" to "-x/2"). You also need to ignore the video at 4:05. (Don't use "+transform.AnchorPoint" on the Layer's Position expression). Hit Layer > Center Anchor Point in Layer Content. Now the box will scale from the side

    • @grinnlock
      @grinnlock 2 года назад

      @@MographMindset Thank You so much !!!!!

  • @ajaynaran1480
    @ajaynaran1480 2 года назад

    Great tutorial. How do you auto resize the textbox to the maximum width of two or more separate text layers?

    • @MographMindset
      @MographMindset  2 года назад

      //Get the Max Width of two text layers
      w1 = thisComp.layer("Line 01").sourceRectAtTime().width;
      w2 = thisComp.layer("Line 02").sourceRectAtTime().width;
      Math.max(w1,w2)

    • @ajaynaran1480
      @ajaynaran1480 2 года назад

      @@MographMindset Okay so I have:
      const {left, top, width, height} = parent.sourceRectAtTime();
      const xPad = effect("x Padding")("Slider");
      const yPad = effect("y Padding")("Slider");
      [width + xPad, height + yPad]
      And that is attached to the first text layer and that works fine, but I have a second text layer and I want that to do same thing.
      So where does this code fit?
      w1 = thisComp.layer("Line 01").sourceRectAtTime().width;
      w2 = thisComp.layer("Line 02").sourceRectAtTime().width;
      Math.max(w1,w2)

    • @MographMindset
      @MographMindset  2 года назад

      @@ajaynaran1480 That code I gave you is just for getting the Max Width of two text layers. There's many different ways to write this, but you can use the code below:
      const {left, top, width, height} = parent.sourceRectAtTime();
      const xPad = effect("X Padding")("Slider");
      const yPad = effect("Y Padding")("Slider");
      const w1 = thisComp.layer("Line 01").sourceRectAtTime().width;
      const w2 = thisComp.layer("Line 02").sourceRectAtTime().width;
      const maxWidth = Math.max(w1,w2);
      [maxWidth + xPad, height + yPad]

  • @yara_camper
    @yara_camper Год назад

    hi, thanks a lot for the tutorial. I wanted to ask a question: how to make the blur effect in the text animator not affect the size of the text box?

    • @eugenn2848
      @eugenn2848 10 месяцев назад

      Try using the 'Fast Box Blur' effect with the 'Repeat Edge Pixels' option enabled.

  • @hanafar9159
    @hanafar9159 2 года назад

    Best!!!!

  • @DanielaMunoz-g4k
    @DanielaMunoz-g4k Год назад

    how can i make it so i have an avatar that is also responsive to the text and box layer? say i want to make a responsive tweet and i code everything to work with the text i am typing in but the avatar, i want to always stay at the top left corner

    • @MographMindset
      @MographMindset  Год назад

      Parent the avatar to the box, and then add an expression to the avatar's Position to pin it to the top-left of the box. Something like:
      --
      const {left, top, width, height} = parent.sourceRectAtTime();
      [left, top]
      --
      You can adjust your avatar Anchor Point or play with the expression to offset it

  • @vickykrupa7825
    @vickykrupa7825 2 года назад

    I'm trying to open it up as I type tNice tutorials. I'm lost right now and my opening screen looks notNice tutorialng like Nice tutorials. Can anyone help?

  • @smithapatel9535
    @smithapatel9535 2 года назад

    When i try to pull out the bar with all the tutorial it does not work

  • @gmioperationsteam
    @gmioperationsteam 6 месяцев назад

    Hi i am using source text to key frame text, something like sub titles, is there a way this expression might work for all source text keyframes

    • @MographMindset
      @MographMindset  6 месяцев назад

      yes, sourceRectAtTime() updates based on your text and works inside AE. But for subtitles, I would suggest creating a .mogrt and using the .mogrt inside Premiere. Much easier & faster

  • @pibezZ666
    @pibezZ666 2 месяца назад

    I need a Textbox that isn't rectangular, but hast jagged edges to the left an right, like a ripped of piece of tape. Is this somehow possible?

    • @MographMindset
      @MographMindset  2 месяца назад

      Yeah. Use a PNG of a ripped piece of tape and follow this tutorial for it to auto-scale and position to the text: ruclips.net/video/IPSUJKKgqCk/видео.html

  • @imaby.k
    @imaby.k 2 года назад

    I'm facing an issue, my text layer bounding box is not changing when I write in more text and its cropping the extra text untill i manually change adjust the text layer bounding box, ( here I'm not talking about the rectangle shape layer) and thus I am not able to use this effect, please help if you have any solution to this.

    • @MographMindset
      @MographMindset  2 года назад +1

      It sounds like you're using "Paragraph Text" instead of "Point Text". Select the Text tool, then right-click the Text layer. Hit "Convert to Point Text"

    • @imaby.k
      @imaby.k 2 года назад

      @@MographMindset thanks bro 😁

  • @jhonhuaman9014
    @jhonhuaman9014 2 года назад

    Hahaha! too brother, too.

  • @dakshaservices4714
    @dakshaservices4714 2 года назад

    Are you live?

  • @helga_eizaguirre
    @helga_eizaguirre 9 месяцев назад

    Hello Mograph Mindset: I've done everything as you said but when adding the padding expression; const { left , top , width, height } = parent.sourceRectAtTime();
    const xPad = effect("x Padding")("Slider")
    const yPad = effect("y Padding")("Slider")
    [width , height + yPad].... It appears a message error:
    Expresson Disabled: Error at line 4 in property "size" o
    Cannot access "yPad' before initialization
    and shows [width, height + yPad]

    • @MographMindset
      @MographMindset  9 месяцев назад +1

      That error means you need to add a semicolon ; after every line in your code. You don't need a semicolon on the final line.
      const xPad = effect("x Padding")("Slider");
      const yPad = effect("y Padding")("Slider");

    • @helga_eizaguirre
      @helga_eizaguirre 9 месяцев назад

      @@MographMindset Oh my God! Thank you soooo much!

  • @bantintuc3411
    @bantintuc3411 2 года назад

    Great explanation but still confused

  • @helga_eizaguirre
    @helga_eizaguirre 9 месяцев назад

    Hello Mograph Mindset: Can you make a video of how to create several clips, each one with a tittle, subtittle, etc... load them from an excel. This is a repetitive task i have to do everyweek. I tried from primiere pro but i could not... so, i am trying to create just one from After Efects.. but is not what I need.. I need to create several ones with texts from an excel, even audio from an excel . The audio should syncronize with the tittle and sub tittle. I also want that the text boxes are all the same lenght.so, if there are 4 text boxes. All of them has the lenght of the longest one? is that possible?

    • @MographMindset
      @MographMindset  9 месяцев назад

      Automating this entire process is highly complicated. You can check out Templater for After Effects. Inside Premiere Pro check out Submachine by Creative Workflow Solutions.

  • @oleksandrklitnii566
    @oleksandrklitnii566 Год назад

    is it possible to use this textbox as a preset?

    • @MographMindset
      @MographMindset  Год назад

      Select the Shape Layer and go to Animation > Save Animation Preset...

  • @nara7280
    @nara7280 2 года назад

    Bruhh.. I did it too haha

  • @agenciagrou1013
    @agenciagrou1013 Год назад

    como animar los textos?

  • @carolpedro3376
    @carolpedro3376 10 месяцев назад

    In a small caps text only, how to make the text box never resize/move up or down, no matter if there is there is any descender or ascender?

    • @MographMindset
      @MographMindset  10 месяцев назад +1

      Unfortunately this is a common problem with text boxes. The height of the text layer calculates the descenders and ascenders.
      You can use 2 separate layers for the Text and Box to make things easier. Try this.
      We'll replace every character with "x" for the box shape so there's no descenders.
      1. Remove all effects from the Text Layer
      2. Duplicate the Text Layer and name the duplicate "BOX"
      3. Parent the "BOX" to the original Text Layer
      4. Add this expression to the "BOX" Source Text:
      var txt = parent.text.sourceText;
      txt.replace(/./g, "x")
      5. Your "BOX" layer should now just be a bunch of x's
      6. Add a Simple Choker effect (set View to Matte), Fill effect to "BOX". It should now look like a solid box.
      7. Expand padding of "BOX" with CC RepeTile or Minimax effects

    • @carolpedro3376
      @carolpedro3376 10 месяцев назад

      @@MographMindset I've found in another channel how to make the box parameters attached to the text parameters (like width) with a Adjustment layer with five Expression Controls:
      Layer control (dropdown menu control) > to refer to text layer
      Edge (point control) > fixed, ~ half of the text height
      Height (slider control) > fixed (according to text body
      Width (slider control) > expression sourceReactAtTime
      HeightWidth+Edge (point control) > expression: effect width slider, effect height slider + effect edge point
      I had to change the anchor point of the text, and set the edge value in a way that text and box always align in the visual middle height.
      (My text is paragraph aligned to the left btw)
      It solved my problem, since I needed to use upper case characters with marks (Ü, Á, È, Ç), in many languages. Thanks though!

    • @MographMindset
      @MographMindset  10 месяцев назад

      @@carolpedro3376 that's great to hear! Glad you got it working

  • @klizx6846
    @klizx6846 2 года назад

    OMG ITS WORKED. Guys it really worked. Thank you 

  • @dobled4096
    @dobled4096 2 года назад

    its stuck on the loading screen.. : (

  • @cashsot
    @cashsot 2 года назад

    TNice tutorials was for 2 years

  • @Rodneylong07
    @Rodneylong07 2 года назад

    help a upcoming artist out I don’t have a problem paying u for your ti

  • @malikg3485
    @malikg3485 2 года назад

    Sa