Move the Get Rect 2.jsxbin file to the After Effects Scripts UI Panels folder.
After Effects (2023) > Scripts > Script UI Panels
In After Effects, make sure “Allow Scripts to Write Files and Access Network” is on.
Preferences > Scripting & Expressions > “Allow Scripts to Write Files and Access Network”
In After Effects, make sure your expression engine is set to JavaScript.
File > Project Settings > Expression Engine > Expressions > JavaScript
In After Effects, open the Get Rect 2 script.
Window > Get Rect 2.jsxbin
Upon purchase of Get Rect 2, you will receive a license code.
You can retrieve your license code from your Gumroad account.
Now you can dock Get Rect 2 anywhere in your workspace. Get Rect 2 features a semi-responsive layout, to help it fit any workspace.
With a layer, or multiple layers, selected, press the Create button to make a rectangle. You can toggle between rectangle, track matte, and bounding box using the icons next to the Create button. Each style will store their own preferences for the appearance settings.
A rectangle is a visible box that will surround the targeted layer(s). Hold shift + create button to make set the rectangle as a track matte for the targeted layer(s).
A track matte is a hidden box that the targeted layer(s) will use as a track matte. Whenever the targeted layer(s) overlaps with parts of a track matte, that part of the targeted layer will be revealed, while everything else will remain hidden.
A box is a visible rectangle with squares on each corner and side of the rectangle. This is used to mimic the same types of bounding boxes used in design software such as Illustrator or After Effects.
When creating any rectangle, track matte, or bounding box, an effect will be added to the new shape layer called Rect Appearance. Here you can adjust most of the attributes or your rectangle – allowing you to tweak the appearance after it is created.
Toggle on the fill icon to include a fill when creating a new rectangle.
With the fill toggle on, you can set the default color of the fill using the color picker.
Toggle on the stroke icon to include a stroke when creating a new rectangle.
Shift + click the stroke icon to switch between Miter Join, Round Join, and Bevel Join on the stroke corners.
With the stroke toggle on, you can set the default stroke color of the fill using the color picker.
Toggle on the corner radius icon to include rounded corners when creating a new rectangle.
Shift + click the corner radius icon to switch between Round Corners, Inverted Round Corners, and Bevel Corners.
With the corner radius toggle on, you can adjust the default radius of the corners.
Toggle on the dynamic icon to make the rectangle automatically adjust its size whenever the source changes. With the dynamic toggle turned off, the rectangle will conform to the size of the source based on the time the rectangle is created.
With the dynamic toggle turned on, you unlock the ability to enable custom time.
This will conform the rectangle to the size of the source at a specified time. Source Time is accessible in the Rect Appearance effect. By default this value will be set to the time the CTI is when the rectangle is created.
Toggle on the Multi-Source icon to create one rectangle that will conform to all the layers selected.
With Multi-Source toggled off, each layer selected will have its own rectangle.
Toggle on the Use Font Height icon to calculate the size of a text source layer based on its font, rather than its true bounding box. This is useful when creating text based boxes since it keeps the height of the rectangle consistent, while ignoring ascenders and descenders.
With Include Rotation toggled on, the rectangle will factor in the source rotation while still remaining a level rectangle.
If this is toggled off, the rectangle will ignore any source rotation.
With Include Rotation toggled on, you unlock the ability to enable Rotate Path.
This will rotate the actual path of the rectangle to match the rotation of the first source layer.
By default, all sides of a rectangle will be set to Auto. This means they will automatically conform to the given side of the source layer(s). You can set a value for any side (i.e. 0) in order to lock that side to a specific position.
To get a position back to Auto, you can delete the existing entry or type “Auto”.
This will set the amount of space between a given side of the rectangle and the same side of the source layer(s).
You can use the constraint toggles to keep the horizontal or vertical values consistent.
The animation toggles will automatically animate the rectangle wiping in from the selected direction (left, right, top, bottom).
You can turn on multiple animation toggles at the same time.
By default, each animation will add 2 keyframes to the beginning of the rectangle layer, lasting a half second.
The Split Stroke button will separate the stroke from the selected shape layer, creating a new layer that is dynamically linked to the target layer, while containing only strokes – no fills. Conversely the stroke will be hidden on the original shape layer.
Note: this works on any shape layer – not just those created with Get Rect 2.
The Trim Path button will add a Trim Paths animation to the selected shape layer(s). By default this will be a half second animation beginning at the current time within the comp.
Hold shift + click Trim Path to reverse the direction.
Note: this works on any shape layer – not just those created with Get Rect 2.
The Bake Rect Size button will convert a dynamic rectangle layer to a rectangle layer with the source shape set to what it is at the current time of the comp. The sides of the source(s) will be stored in a new effect called Rect Shape.
The Rect Appearance effect is not affected.
The Bake Rect Path button removes any and all Get Rect effects and expressions. The new path will be equal to the value it is at the current time within the comp.
Note: this works on any shape layer – not just those created with Get Rect 2.
When creating a bounding box, a special effect called Bounding Box will be applied to the new shape layer. Here you can adjust the appearance of a few attributes unique to bounding boxes.
This sets the size (in px) of the corner squares.
This sets the size (in px) of the side squares.
This sets the roundness of each point (aka square) of the bounding box.
When toggled on, the stroke width of each point (aka square) will match the stroke width of the rectangle.
With Match Point Stroke toggled off, change this value to change the stroke width of the points (aka squares) independently from the main rectangle stroke.
Initial release