import mask, keyframe data from text file or svg - elaborate

What type of scripts do you need?

Moderator: byronnash

Post Reply
evesira
Posts: 4
Joined: July 30th, 2009, 10:52 am

Hello all,

This is a pretty elaborate problem, so I'll have to tell you a little bit about where I'm coming from and why I need this. This may not be possible, and if so, then please disregard this as a request. =)

I'm developing a graphic design tool that graphs interesting geometric and mathematical curves. The app can export the images as SVG (polyline) or as raw position data in a text file.

Here's what I have so far:
Open the exported SVG in Illustrator, and copy the desired path. Then you can paste it into After Effects as a mask or keyframe data (for example, the position property).

So what's the problem with this? Well, I don't want my users to have to own Illustrator so they can use the app with After Effects. Now I know it is possible to write a script that imports keyframes from a text file, but what about a mask? Is it possible to import a mask from an svg or text file?

Another thing I considered is trying to mimic how the path is actually pasted into AE. I was hoping that adobe made use of the windows clipboard, so I could see the actual data that is being passing from AI to AE when you copy and paste. I could write my app to put a certain string of numbers on the windows clipboard, if someone knows the proper way to format this so that AE could accept the paste.

Does all that make sense? I appreciate any insight you can give me...
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

A script can parse a svg file containing some path data (e.g. polyline), and create/animate a mask/shape accordingly. If you have scripting abilities, look at the Shape() object in the scripting guide for more info on how to access and set mask path value.
evesira
Posts: 4
Joined: July 30th, 2009, 10:52 am

Yes, thank you! That's all i needed to know!

I was looking for a "mask" object in the guide, but i couldn't find it.
Post Reply