1

I need to rig up some expressions to a shape layers "size" and "position" parameters and the layer transform "position" parameter as well. When I create the shapes directly in AE there are the shape parameters of size, position and rotation. Though, when I import AI files and convert them then they lose the options of the shape itself and the only option that is available to edit is the "path" parameter.

How do I import AI files as parametric shapes not a bezier shape?

2 Answers 2

0

I don't think that it's possible to import AI shapes as parametric shapes (in 2019 at least, this might change, with luck). There are workarounds that can help though.

If you convert the AI layer to a shape layer you can get the individual points of the path like so:

var pts = thisComp.layer("test Outlines").content("Group 1").content("Path 1").path.points(t = time)

where the layer "test outlines" is the shape layer created by converting the AI document, and Group 1 is one of the paths in the shape layer. Then for a rectangle you can get the size like this:

var pts = thisComp.layer("test Outlines").content("Group 1").content("Path 1").path.points(t = time);
var size = pts[0] - pts[2];

if you want to set the size you could do the reverse, putting this on the path property:

var size = [123, 45];
var pts = [[0, 0] - size/2, [0 - size[0]/2, size[1]/2], size/2, [size[0]/2, 0 - size[1]/2];
createPath(points = pts, inTangents = [], outTangents = [], isClosed = true);

if you do the substitutions you'll see that the second line works out to

[-61.5, -22.5], [-61.5, 22.5], [61.5, 22.5], [61.5, -22.5]]

which describes a rectangle 123 wide and 45 high.

0

The overlord plugin can do this with simple shapes from AI. https://www.battleaxe.co/overlord/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.