• I have this on my list of feature requests, but it is not implemented, yet. Will be included in the next update, but I have no estimate when the next update will be published. Definitely not within the next few month.
    For background shapes (but not the text itself) iExpressions has a solution with maximum size controls:
    https://mamoworld.com/tutorials/auto-resizing-background-shapes-iexpressions-ae

    Hi, Just like minimum size, can we do a maximum size? where the size of the text decreases so as to not expand the box?

  • I am curious if there is a way to duplicate an entire rig of text, box, and pins to make a 2nd or 3rd unique copy? Basically a new copy in the same comp if I want everything to be the same, but type new text without all the expressions linking back to the first instance.

    Thanks,
  • Effectively, you have to update in the expressions of the duplicate the layer names.

    Say you have a rig with a text layer with name "Text 1" and and then Pins layer names like "Pin Top Left of Text 1" etc. Now you duplicate all your layers and Ae names the duplicates automatically with a "2" at the end instead of "1". Then you need to do a search & replace in all expressions of the duplicated layers where you search for "Text 1" and replace it with "Text 2".

    In my upcoming tool Automation Blocks I have such a search & replace function. If you want to joint the private beta, please send me an email to [email protected]. Otherwise, it is a a bit tedious, manual operation (you can copy & paste the expressions to a text editor one by one and do the search & replace there).

    I am curious if there is a way to duplicate an entire rig of text, box, and pins to make a 2nd or 3rd unique copy? Basically a new copy in the same comp if I want everything to be the same, but type new text without all the expressions linking back to the first instance.

    Thanks,

  • Tool is sooo useful! Thank you!

    One hurdle I'm running into: I'm animating a typing effect with a few different text layers and their pins included in the box. So one text layer types in as the box scales, then the next layer, etc. Issue is the box includes the 'empty' states in its calculations for all the text layers, even if they do not have any text in them yet. I assume this happens since the pins for those layers are included in the box, and they sit at the bottom of their respective text layers, even if empty. Is there an easy way to have pins included in a box, but be able to be animate on or off for the box calculation? I tried trimming the layers and using opacity (for both the text layers and their pin layers), but the box seems to include the pins in its calculations no matter what.

    TLDR: Is there a way to animate pins being included in a box so I can animate them being added in vs the box always including their dimensions.
  • Hi Ryan,

    I think the easiest solution would be an expression on the position of your second layer, like this one:

    var p = value;
    if(text.sourceText == "") p[1] = p[1]- 100;
    p

    It keeps the the position unchanged unless the text of the layer itself is empty. If it is empty, it moves the position of the text 100px upwards (such that it should be within the area of the text above it). You need to adjust the 100, depending on the borders of you box and the text sizes.

    Attached is a little sample project.


    Tool is sooo useful! Thank you!

    One hurdle I'm running into: I'm animating a typing effect with a few different text layers and their pins included in the box. So one text layer types in as the box scales, then the next layer, etc. Issue is the box includes the 'empty' states in its calculations for all the text layers, even if they do not have any text in them yet. I assume this happens since the pins for those layers are included in the box, and they sit at the bottom of their respective text layers, even if empty. Is there an easy way to have pins included in a box, but be able to be animate on or off for the box calculation? I tried trimming the layers and using opacity (for both the text layers and their pin layers), but the box seems to include the pins in its calculations no matter what.

    TLDR: Is there a way to animate pins being included in a box so I can animate them being added in vs the box always including their dimensions.

    zip
    zip
    move up when text is empty.aep.zip
    15K
  • Thanks for the fast reply!

    This is a good solution! I should have mentioned that I'm actually pinning the higher text layers to the lower ones so it all grows upwards vs down, so this sadly doesn't work for my specific use case. I'm also using a script to animate the text typing in. All that to say, I know my need/issue is pretty specific so not expecting an answer exactly for me haha. Thanks for the help though! I'll noodle a bit based on your script suggestion and see if I can get something to work. I can sort of fake it using scale on the box layers box effect... I'll keep noodling. (Wonder if a feature update could ever allow an animatable check box for the included Pins on the box layer? Or something...)

    thanks for the great tool!
  • If it grows upwards vs. down, maybe it is already sufficient to change the order of the offset? So instead of -100 you do +100 to move the text downwards (i.e. towards its parent).

    If you already have an expression on the position of the text layer itself, you can apply the expression to a parent null. (i.e. if the text is currently parented to a Pin, create a new null, parent the null to the Pin and then the text to the null). That way, you can still change the position of the text layer itself with other expressions and add the necessary offset using the parent.

    If you want a box to become completely invisible when a particular text is empty, you can also apply an expression to the opacity of the box layer:

    thisComp.layer("text layer name").text.sourceText == "" ? 0:value

    If you apply this expression to the opacity of a box, it will set the opacity to 0, if the source text of the layer with name "text layer name" is empty and otherwise keep its normal opacity value.

    Thanks for the fast reply!

    This is a good solution! I should have mentioned that I'm actually pinning the higher text layers to the lower ones so it all grows upwards vs down, so this sadly doesn't work for my specific use case. I'm also using a script to animate the text typing in. All that to say, I know my need/issue is pretty specific so not expecting an answer exactly for me haha. Thanks for the help though! I'll noodle a bit based on your script suggestion and see if I can get something to work. I can sort of fake it using scale on the box layers box effect... I'll keep noodling. (Wonder if a feature update could ever allow an animatable check box for the included Pins on the box layer? Or something...)

    thanks for the great tool!

  • THIS IS LITERALLY SAVING MY LIFE!!

    I create a lot of MOGRTs and I've spent countless hours fighting with sourceRectAtTime and always running into problems. Pins & Boxes has been saving me HOURS. 

    Definitely one of those things that should absolutely be built into AE by default but yeahh of course not. 

    THANK YOU!!
  • Ran into this same issue with characters that hang down interfering with my line spacing. I tried this and it works! Thanks Tristen 
    I had one issue though... I wanted to be able to split my text into multiple lines while still having this work. The character index gets thrown off by 1 with line break. So if I hit enter once the "E" pops back on and if I hit it twice, "g" pops back on. 
    I found a janky work around if this helps anyone. I made it text.sourceText+"     Eg" and then set the character index L-7.
    Now it won't break unless I add more than 5 lines! And I could always increase that number.
    Hope this helps someone, or if anyone has a less janky fix, I'm all ears!

    yes 
    to keep the last line constant height:

    add this to your source text
    +"Eg"

    add this to an opacity animator (set to zero) to take off the EG 
    L = text.sourceText.length;
    L-2

    to keep the first line constant add "Cg" to the start, minus indent the first line of the paragraph those two characters, move the paragraph over to the left and mask off the rest of the paragraph to hide the Cg. This keeps the text height and left align constant, so you can anchor the text and box and no jumpy jumpy. The C is the most left Curved character, though maybe an O to be safe? the g is the descender. For height alone you can use an "|" at the end, if you can figure out how to type that om a PC!

    I can see a new tutorial may be possible Mamo?

  • Are there any plans to add support for 3D layers?
  • Hi Jeremy,
    we have no plans for that, yet, but it is a good feature request! 
    I've just added it to my list. :-)

    Are there any plans to add support for 3D layers?

  • Hi, I have been using Pins and Boxes for a while now and use the expression you suggested to hide a text box when there is no text:

    var text = thisComp.layer("my text layer").text.sourceText;
    (text.length == 0) ? 0 : value

    I have now created an Essential graphic with a text input field which fills a 3 line paragraph text box. I use a range selector to scales down unwanted lines and Pins and Boxes creates a text box around the remaining text. This creates individual lines with individual text boxes however the expression above does not work because there is still text in the paragraph box which is scaled down and hidden.
    Is there a way to adapt the expression so it references the lines in a specific range and hides the text box Pins and Boxes creates?


  • Hi Ian,

    not sure what the conditions look like that you use to scale down the text. 
    But you could change the expression like this

    var text = thisComp.layer("my text layer").text.sourceText;
    (text.length == 0 || OTHER CONDITION) ? 0 : value

    if you want the visibility to be 0 if either the text ist empty or some other condition is met. You just need to replace OTHER CONDITION be a code statement indicating the situation that your text is scaled down.


    Hi, I have been using Pins and Boxes for a while now and use the expression you suggested to hide a text box when there is no text:

    var text = thisComp.layer("my text layer").text.sourceText;
    (text.length == 0) ? 0 : value

    I have now created an Essential graphic with a text input field which fills a 3 line paragraph text box. I use a range selector to scales down unwanted lines and Pins and Boxes creates a text box around the remaining text. This creates individual lines with individual text boxes however the expression above does not work because there is still text in the paragraph box which is scaled down and hidden.
    Is there a way to adapt the expression so it references the lines in a specific range and hides the text box Pins and Boxes creates?



  • Thanks for the quick response, I will try and figure it out.
  • Hey Möhl! Would it be possible to make it so a box created with pins and boxes completely disappears when the X axis or Y axis is scaled to 0%? Currently it will leave a thin line on screen at 0%, which means you have to trim the layer at the end of the scale animation in order to make the box completely invisible.
  • Hi Cyan,
    very good point! You can apply this expression to the opacity of the box layer:

    (effect("Box")("Scale X")*effect("Box")("Scale Y")!=0)?value:0

    It will set the opacity of the box to 0 if "Scale X" or "Scale Y" are zero. Otherwise it uses the normal keyframed opacity value (i.e. you can still keyframe the opacity even when the expression is active.

    Hey Möhl! Would it be possible to make it so a box created with pins and boxes completely disappears when the X axis or Y axis is scaled to 0%? Currently it will leave a thin line on screen at 0%, which means you have to trim the layer at the end of the scale animation in order to make the box completely invisible.