• Hello.  Do you know if this works with text layers created using a text bounding box (by clicking, holding and dragging a text box to fit a certain size)?  As opposed to hitting "Enter" when you want a second line the text bounding box automatically moves text to a new line when needed.  I'm curious if this Pins & Boxes script would work with that type of text as well.  Thank you.
  • Hi Paul,
    yes, it also works for Paragraph Texts (aka Box Texts). The pins always stay attached to the actual bounding box of the text, not to the (usually bigger) bounding box that you have drawn with the mouse. See attached picture. 

    Hello.  Do you know if this works with text layers created using a text bounding box (by clicking, holding and dragging a text box to fit a certain size)?  As opposed to hitting "Enter" when you want a second line the text bounding box automatically moves text to a new line when needed.  I'm curious if this Pins & Boxes script would work with that type of text as well.  Thank you.

    Screenshot 2018-11-29 20.25.45.png
    1008 x 722 - 58K
  • @mamoworld Mohl ... Thank you very much.  That is great news.  This is going to be a very fun, very useful tool for the arsenal.  
  • You are welcome, Paul :-)

    @mamoworld Mohl ... Thank you very much.  That is great news.  This is going to be a very fun, very useful tool for the arsenal.  

  • Hi!
    I noticed an issue. The script doesn't work with Cyrillic text. When I create a text in English everything is ok, pins and box. But when change the text to Russian, AE disable expression. ".... layer named '...' is missing or does not exist...."
    Hope you will fix it :)
  • Hi Evgeniy,

    thank you for the feedback! I think this is a general issue with expressions not supporting these kinds of special symbols. What you can do is to rename the text layer to something that does not have Cyrillic letters. Because having Cyrillic letters in the text should not be a problem - only having them in the layer name causes issues. Once you renamed the layer, the layer name also won't change if the text itself is changed later.

    Cheers,
    Mathias

    Hi!
    I noticed an issue. The script doesn't work with Cyrillic text. When I create a text in English everything is ok, pins and box. But when change the text to Russian, AE disable expression. ".... layer named '...' is missing or does not exist...."
    Hope you will fix it :)

  • Hi,

    I love this script so far!

    I'm wondering, is there a way/workaround to change the anchor point of a line/box created using the script? I'd like one of the vertical lines I've created to rotate from its top most point but the anchor point can't be moved.

    Thanks,
    Mac
  • Hi Mac,

    this is a very good feature request.
    The position and anchor point of the shape layer have an expression applied that makes sure they always stay in the center of the composition. This is necessary to ensure that everything works properly even if you change the comp size later. But in principle, the rig works no matter where you place the anchor point IF you make sure that position and anchor point always have the same value.

    Workaround:
    1. Apply the anchor controls of Pins & Boxes to the box layer (icon "A", see this tutorial )
    2. apply to the position of the Box layer the expression "transform.anchorPoint" (this is the same as pick-whiping the position to the anchor point such that they always have the same value.
    Now you can use the Anchor Control effect of the box layer to control where (relative to the box itself) the anchor is located.

    I just did a few quick tests with this, so I am not 100% sure whether this might have any undesired side effects, but it should work.


    Hi,

    I love this script so far!

    I'm wondering, is there a way/workaround to change the anchor point of a line/box created using the script? I'd like one of the vertical lines I've created to rotate from its top most point but the anchor point can't be moved.

    Thanks,
    Mac

  • @mamoworld Möhl Thank you so much for your fast response! The workaround you've described is exactly what I need! :) 

    I'm also wondering, is there a workaround to specify a line size/length that is fixed (not a percentage)? In other words, initially a fixed size, regardless of the text, but that eventually scales to fit the text. 
    I ask because I am attempting to have a box of lines (4 fixed sides) unfold and scale into the sizes needed to fit the text. 
    I understand this may not have a simple workaround but thought I'd check. 

    Thanks again, you've saved me so much time with this script (and the workaround you've already provided)!
  • Hi Mac,

    you can do this with my ExpressionTimeline.
    It can fade from any expression to keyframes or other expressions - this also works with the expressions generated by Pins & Boxes.

    Here is how it works in detail:
    1) paste the expression from Box->Contents->Box Group->Box Rectangle->Size
    into Expression Timeline
    2) set the start frame of the expression in ExpressionTimeline to where the middle of the transition from square to final size should be
    3) add a duration of the transition
    4) apply the expression from ExpressionTimeline to the same property (Box->Contents->Box Group->Box Rectangle->Size)
    5) set the keyframe value of Box->Contents->Box Group->Box Rectangle->Size to the start box size you want to have.

    The attached image shows how the Expression Timeline should look for this (assuming you want a transition of 50 frames with the middle of the transition being at frame 125).

    Note that with Expression Timeline you can have as many transitions as you want, so you can also transition into and out of the final size if you like.


    @mamoworld Möhl Thank you so much for your fast response! The workaround you've described is exactly what I need! :) 

    I'm also wondering, is there a workaround to specify a line size/length that is fixed (not a percentage)? In other words, initially a fixed size, regardless of the text, but that eventually scales to fit the text. 
    I ask because I am attempting to have a box of lines (4 fixed sides) unfold and scale into the sizes needed to fit the text. 
    I understand this may not have a simple workaround but thought I'd check. 

    Thanks again, you've saved me so much time with this script (and the workaround you've already provided)!

    pins_boxes_expression_timeline.png
    574 x 249 - 45K
  • @mamoworld Möhl What an awesome script! Seems like the perfect solution for my problem (and could help on other projects too). Thanks again!
  • In your overview video you show how IN PROGRAM when you add character to your text line the box grows to accommodate these new characters.  However, the only way I know how to animate this sort of effect is to use the text 'add animation' button and to animate the opacity per character after adjusting the range parameter.

    Is there a way with your script to do this typing effect with the box growing as an actual render?  
  • Hi Austin,
    the overview video is made with a screen capture of me live performing this.

    If you change the text with text animators (or with my Scroll Text Terminal iExpression, for example), then the box will also react to these changes automatically (in the comp preview and also in the final render).

    Note that Pins & Boxes has two types of pins:
    (A) Pins that follow the text on all frames and update, no matter how the text changes over time and
    (B) pins which represent the outline of a text at a specific point in time
    For your scenario you want to create boxes based on pins of type (A) such that the pins (and hence the box) update when the text changes over time.

    In your overview video you show how IN PROGRAM when you add character to your text line the box grows to accommodate these new characters.  However, the only way I know how to animate this sort of effect is to use the text 'add animation' button and to animate the opacity per character after adjusting the range parameter.

    Is there a way with your script to do this typing effect with the box growing as an actual render?  

  • Great tool! I am so done with writing out sourceRectAtTime(). This is such a great tool. Thank you!

    I'm curious about your thoughts on the following problem. See http://totallytype.com/anatomy.php#/ for reference. When designing for text I often design with the baseline and cap height in mind (as opposed to also including ascenders and descenders). For example, when I build a box around text, I want the box to maintain its y-height even when I add a lowercase g (a descender). Currently though, the box will grow in the downwards direction when you add a descender. Any ideas for a way to work around this? I'd love if I could have a pin that attaches to the baseline and cap line of text, but I don't know how I would code that. Another idea I had would be to make a pin that is locked to time with characters that include a caps and no descenders. This would lock in the height I want, but it would make it so I couldn't expand the box horizontally. 
  • Hi Jeremy,

    this is very good feedback, thanks!

    In general, I think there is really no clean solution for this at the moment. Please submit a feature request that the Ae team should add functions to expressions to access baseline and cap height information (ideally also for multi-line text). If you post this on use voice, please send me the link and I will vote for it.

    In the mean time, the only thing that comes to my mind is that the anchor point is located at the base line of the first line of a text by default. So you can
    1) create a pin that is not connected to any layer (make sure no layer is selected and click "Pins".
    2) copy the position of your text layer to the position of the pin
    3) parent the pin to the text layer.
    Now your pin is located at the anchor point of the text layer, i.e. at the base line of the first text line.


    Great tool! I am so done with writing out sourceRectAtTime(). This is such a great tool. Thank you!

    I'm curious about your thoughts on the following problem. See http://totallytype.com/anatomy.php#/ for reference. When designing for text I often design with the baseline and cap height in mind (as opposed to also including ascenders and descenders). For example, when I build a box around text, I want the box to maintain its y-height even when I add a lowercase g (a descender). Currently though, the box will grow in the downwards direction when you add a descender. Any ideas for a way to work around this? I'd love if I could have a pin that attaches to the baseline and cap line of text, but I don't know how I would code that. Another idea I had would be to make a pin that is locked to time with characters that include a caps and no descenders. This would lock in the height I want, but it would make it so I couldn't expand the box horizontally. 

  • In relation to my previous question I also came up with a solution. However it only works for single lines of text

    1. Create two text layers. One that just has the baseline and cap height (a capital H for example) and attach two pins on the left side. Then create your actual text and attach a pin on the right middle. 
    2. Parent the text together in addition to adding your wonderful anchorpoint expression (so brilliant by the way)
    3. Create a box from the 3 pins mentioned above. Now it will grow with the text but maintain baseline and cap height
  • Is there any way to change which pins a box is referencing after creating it? Perhaps I could request this feature for Version 2 of pins and boxes?
  • Yes, do add some pins to a box, just select both the box layer and some pins layer(s) and click the "+" button at the bottom of the Pins & Boxes UI. If you click "-" instead, it will remove the selected Pins from the selected box.

    Also, thank you for sharing your solution! I have put some notes on my list of feature requests and maybe can add better support for some kind of workaround along those lines.

    Is there any way to change which pins a box is referencing after creating it? Perhaps I could request this feature for Version 2 of pins and boxes?

  • Has anyone found a way to use this with a text box, not regular text? 
    I want text to type in, so when a word is on the right hand side it starts typing on one line but then as it gets too long it drops to the next line.
    I can't do this with normal type...
    Or can I?
    I guess I need a max length pin somehow, not a minimum...
    I also want to be able to scale a box up, but then it not go back down (flashing cursor is adding height...)
    this doesn't work with a current time pin... 

  • If it helps Jeremy...
    In the past I have made a matte for the text layer then positioned "Eg" outside of this.
    (Thanks Dan Ebberts for that tip)
    This sets the Cap and descender height for the first line.
    I can't figure out a way to do this to the end of the text though, to set a constant height for the last line of text...
    I can add "EG to the source text but I can't hide it.
    Oh hang on...
    I think  I managed this before with an expression on an opacity animator that removed the last two characters...
  • 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?
  • Great tips, Tristan!
    Pins & Boxes also works with box text (you create box text layer in Ae by clicking & dragging instead of just clicking with text tool).

    I think I don't fully understand your flashing cursor issue.
    Has anyone found a way to use this with a text box, not regular text? 
    I want text to type in, so when a word is on the right hand side it starts typing on one line but then as it gets too long it drops to the next line.
    I can't do this with normal type...
    Or can I?
    I guess I need a max length pin somehow, not a minimum...
    I also want to be able to scale a box up, but then it not go back down (flashing cursor is adding height...)
    this doesn't work with a current time pin... 


  • I have another expression adding a flashing | to the end of the source text to simulate typing cursor.
    That is why I had to take 4 off, E+g+space+|
    So I have offset it to remove the Eg now.
    I see anchorpoints fix the left edge, but then a hack would be required to put "quotation marks" correctly outside the paragraph
    As far as text box goes,it seems to add pins to the whole box not the text as it types on, but I will keep learning.
    Overall a great timesaver and this week's favourite thing.
  • Pins & Boxes should support box text properly.
    I just recorded this to demonstrate it:


    As far as text box goes,it seems to add pins to the whole box not the text as it types on, but I will keep learning.
    Overall a great timesaver and this week's favourite thing.

  • Is it possible to attach pins to Shapes so that animating the size of elements keeps the pins attached. This is needed to keep rounded edges consistent, so animating scale not useable. If I add pins they do ot follow the shape. I may be being dumb... Do I have to make nulls first then make a box from those?
  • Hi Tristan,
    attaching pins to shape layers is possible, attaching them to individual pins is not. So make sure to keep each shape on an individual layer if you want to measure the size of individual shapes.
    I recorded this question as a detailed answer:


    Is it possible to attach pins to Shapes so that animating the size of elements keeps the pins attached. This is needed to keep rounded edges consistent, so animating scale not useable. If I add pins they do ot follow the shape. I may be being dumb... Do I have to make nulls first then make a box from those?

  • This is my new favorite way to rig things... BUT I discovered a huge problematic bug! If you move the layers in time, or trim them, the connection between the pins and the mother layer breaks! I was just trying to clean up my layers and moving anything around in time totally broke everything!!
  • Hi Andrew,
    trimming or moving layers should not cause any issues for Pins & Boxes.
    Can you send me your project and tell me what steps I need to do to break it?  Then I can check what is going on.
    Best send the project using the support ticket you already opened. In general tickets are the fastest and recommended way to get support.

    The only things to be aware of when cleaning up your project:
    - of course with "current time" pins, you need to make sure that the layer markers stay at the frame where you want to measure the layer location and
    - you should make sure that the layers have a unique name. If two layers in the same comp have exactly the same name, the pins won't be able to distinguish between them.


    This is my new favorite way to rig things... BUT I discovered a huge problematic bug! If you move the layers in time, or trim them, the connection between the pins and the mother layer breaks! I was just trying to clean up my layers and moving anything around in time totally broke everything!!

  • I'm trying to figure this out, but there doesn't seem to be a way to pin multiple boxes together? I'm looking for a way to create a dynamic grid of shapes and this plugin seems like it would work, however I can't pin one pin to another pin. 

    Thoughts? 
  • Hi Anthonyo,

    the problem with a grid is that the location of each entry depends on all entries above and left of it. A fundamental concept of Pins & Boxes layout is that you have a parenting structure (objects are parented to the pins of the objects relative to which they should be placed) and a layer can only have one parent, so you cannot place relative to both the layer above and left of you, if those are independent (i.e. one of them should not be the parent of the other).

    I think the best thing you can do (although this is not really a grid) is to create this row by row and let all objects float left. So start with the top left corner object, and parent its right neigbor to its [right,center] pin. Continue like that until the first row is finished.
    Now create a box box around all the objects in the first row to measure its total height. For this box create a (left,bottom) pin and parent the first (left) object of the second row to it. Then built the second row exactly as the first one.

    For a single row or column iExpressions also has a solution:
    Maybe I should add a version for a grid to iExpressions, too.

    Cheers
    Mathias
    I'm trying to figure this out, but there doesn't seem to be a way to pin multiple boxes together? I'm looking for a way to create a dynamic grid of shapes and this plugin seems like it would work, however I can't pin one pin to another pin. 

    Thoughts? 

  • Thanks so much Mathias I'll give you solution a try! 
  • Love this. If I were to change one thing when you hit "box" to create a box it would place it just above or below the selected pins rather than at the top of the layer stack. I try to keep my pins sorted with the box. However, I could see someone else hating that and wanted the current placement. Thanks for the great script!
  • Thank you for the feedback! I will write it on my list of feature requests. Maybe I can make it an optional behavior that can be configured via preferences.

    Love this. If I were to change one thing when you hit "box" to create a box it would place it just above or below the selected pins rather than at the top of the layer stack. I try to keep my pins sorted with the box. However, I could see someone else hating that and wanted the current placement. Thanks for the great script!

  • Hi,

    I was just wondering if there's a way for this to read "footage masked sizes" instead of the current "full footage size"? I'm looking to create a multiscreen styled video with footage and different crop sizes and different grid layouts. 


    Similar style to this but more dynamic and fluid movement

    With text, the text box dynamically adjusts but it doesn't register if it's masked footage. 

    thanks in advance
    Sam
  • Hi Sam,
    Pins & Boxes relies on the sourceRectAtTime expression to determine the size of the layer and it does not seem to involve masks in the calculation. If the Ae team adds a way to measure the size including masks with expressions, I am happy to support that  with Pins & Boxes.

    However, I don't understand 100% what you need this for. Do you want the user to be able to edit the masks and the texts should move with the masks automatically? Would it be good enough to be able to connect a pin to a vertex of your mask? In this case my tool iExpressions could be a solution:
    1. click on Pins & Boxes "Pin" button without any layer selected. That will create a pin which is connected to no layer.
    2. apply the Link to Point on Shape iExpression to the position of the pin to link it to any vertex of a mask (or also shape path). The expression supports both linking to a percentage (say 50% to link to middle of path) or to a particular vertex (like any of the 4 corners for a rectangle).


    Hi,

    I was just wondering if there's a way for this to read "footage masked sizes" instead of the current "full footage size"? I'm looking to create a multiscreen styled video with footage and different crop sizes and different grid layouts. 


    Similar style to this but more dynamic and fluid movement

    With text, the text box dynamically adjusts but it doesn't register if it's masked footage. 

    thanks in advance
    Sam

  • On Overview Part 2 Animation, right at the start of the video, it shows two lines of text in a box (both created in Part 1). The top line is modified by typing a carriage return and some new text. The box gets higher and the lower text moves down accordingly. However, when I do this, the second line of the top line overlays the lower text - the lower text does not move, although the box will get higher as needed.

    In this isn't clear, I can provide a video of what I'm doing.
  • Hi Rick,

    this sounds like you forgot to parent the second text to the bottom right pin of the first text.
    See Part 1 at 1:06


    On Overview Part 2 Animation, right at the start of the video, it shows two lines of text in a box (both created in Part 1). The top line is modified by typing a carriage return and some new text. The box gets higher and the lower text moves down accordingly. However, when I do this, the second line of the top line overlays the lower text - the lower text does not move, although the box will get higher as needed.

    In this isn't clear, I can provide a video of what I'm doing.

  • Thank you for the assistance, Mathias. I figured it was a "stupid operator error". 
  • I am always happy to help :-)

    Thank you for the assistance, Mathias. I figured it was a "stupid operator error". 

  • Is it possible to Pin Left/Right Center (Vertically)?
  • Hi Kukuh,
    yes, if you shift-click the pins button, you see a dialog where you can choose exactly which pins you want to create - also left/center and right/center.
    Furthermore, each pin has effect controls to change its location any time later, after you created the pin (These  controls work as percentages, so if you set the location to 0% for X and 50% for Y, it will be in the left/center for example).
    Is it possible to Pin Left/Right Center (Vertically)?

  • This script has really helped me out on a current project. I'm creating a lower third template mogrt for Premiere with three lines but the third line is not always used.  Currently if I have no text in the third line, I am still seeing the remains of the margin sizing as a small box.  I can zero out the margin settings to eliminate it but I need to do a lot of these.  Is there a simpler way to have the box not show up at all if there is no text entered? I'm animating opacity so I can't include that property in the mogrt.  Is my problem because I want to include the margin settings in my mogrt? Thanks in advance for any help.
  • Hi Frank, you could apply the following expression to the opacity of the box layer (this also works if the opacity has keyframes):

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

    Just replace the 'my text layer' by the name of your text layer. The expression will set the opacity to 0 if the text is empty and otherwise use the normal (keyframed) opacity value. If you don't like to have an expression on your box layer's opacity, you could also apply it to the opacity in the box layers' "Contents->Box Group->Fill 1" and "Contents->Box Group->Stroke 1".

    This script has really helped me out on a current project. I'm creating a lower third template mogrt for Premiere with three lines but the third line is not always used.  Currently if I have no text in the third line, I am still seeing the remains of the margin sizing as a small box.  I can zero out the margin settings to eliminate it but I need to do a lot of these.  Is there a simpler way to have the box not show up at all if there is no text entered? I'm animating opacity so I can't include that property in the mogrt.  Is my problem because I want to include the margin settings in my mogrt? Thanks in advance for any help.

  • I tried the Fill and Stroke version and it worked perfectly.  Thanks very much Mathias!
  • Great, thank you for the feedback, Frank :-)

    I tried the Fill and Stroke version and it worked perfectly.  Thanks very much Mathias!

  • Sorry to bug you again but I'm running into one more issue (on my end I'm sure - not your products).  I've created a project for a mogrt with four possible headers and four possible text boxes - one under each header.  I've pinned the bottom of each header to the top of the following text box and the top of the following headers to the bottom of the preceding text box. If there is no text in a box, then I erase the header as well.  The mogrt has eight locations for text entry or removal. I just discovered that if I have a text entry in the first header and text box, none in the second and third, then the fourth goes haywire positionally and messes up the box dimensions and everything.  I expect that's because I've pinned it to a location that no longer exists. Any advice on how to handle this situation so that the text boxes and headers maintain their relative position (while still expanding or collapsing based on text size/amount)?  Hopefully I've explained this well enough. Thanks in advance for any ideas.

    Amendment - It appears that perhaps the main problem here is that as the text in the various boxes changes, the horizontal alignment of all the text layers is thrown off substantially.  I end up with a stair step effect on the headers and each text box below. Perhaps it's just a matter of somehow pinning two sides of each layer? One to some object on the left side and one to the layer above?

    Further Amendment - Now I've been able to get things mostly working by just left aligning everything and using the same as above setup but pinning everything to the lower left pin (text to header to text to header, etc.). I'd still love to be able to do it without having to left align everything if possible.  Also one additional issue, now there are large gaps where the missing header/text would be.  Any way to deal with those?
  • Hi Frank,
    can you open a support ticket at
    https://aescripts.com/contact/
    and include a link where I can download the project? Then I can take a look.
    Make sure to choose Pins & Boxes as product in the ticket, then it is assigned to me.


    Sorry to bug you again but I'm running into one more issue (on my end I'm sure - not your products).  I've created a project for a mogrt with four possible headers and four possible text boxes - one under each header.  I've pinned the bottom of each header to the top of the following text box and the top of the following headers to the bottom of the preceding text box. If there is no text in a box, then I erase the header as well.  The mogrt has eight locations for text entry or removal. I just discovered that if I have a text entry in the first header and text box, none in the second and third, then the fourth goes haywire positionally and messes up the box dimensions and everything.  I expect that's because I've pinned it to a location that no longer exists. Any advice on how to handle this situation so that the text boxes and headers maintain their relative position (while still expanding or collapsing based on text size/amount)?  Hopefully I've explained this well enough. Thanks in advance for any ideas.

    Amendment - It appears that perhaps the main problem here is that as the text in the various boxes changes, the horizontal alignment of all the text layers is thrown off substantially.  I end up with a stair step effect on the headers and each text box below. Perhaps it's just a matter of somehow pinning two sides of each layer? One to some object on the left side and one to the layer above?

    Further Amendment - Now I've been able to get things mostly working by just left aligning everything and using the same as above setup but pinning everything to the lower left pin (text to header to text to header, etc.). I'd still love to be able to do it without having to left align everything if possible.  Also one additional issue, now there are large gaps where the missing header/text would be.  Any way to deal with those?

  • Done.  Thanks for taking a look. I'm sure I just don't know how to rig it correctly.
  • 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?