rectangle to line

Rectangle to Line is an After Effects script that automates the conversion of rectangle shape layers into single-path strokes. It detects the dimensions, position, and color of a selected shape, replacing it with a precise line based on the rectangle’s proportions. The script determines stroke orientation by the longest side of the shape, though it defaults to a vertical stroke for squares with equal dimensions.

The conversion works universally across all rectangle layers, generating a stroke regardless of whether the original shape has a fill, an existing stroke, or no styling properties at all. If the original rectangle has rounded corners, the script will not inherit that rounded corner geometry, as the resulting output is always a straight-path stroke.

Currently tested and working with After Effects 2024 and 2025.

This tool was developed with the assistance of ChatGPT.

Previous
Previous

Fill & Stroke Swap

Next
Next

Copy Markers To Timeline