Copy link to clipboard
Copied
Hello, I have a script running in after effects tha generates javascript objects based on the compositions and layers in a project.
Is there an easy way to save data, like these objects, to a project so the next time it is loaded that data can be used?
I attempted adding an attribute manually ex:
app.projects.myObjects = {Object list};
This only worked during the run time of the project, once reloaded the attribute is reset.
The goal really is to somehow save the progress or state of the script so that the project can be closed and resumed
without losing your progress.
I would look at the XMP data part. That way you would be able to save the data that you want in the actual project.
Copy link to clipboard
Copied
There are two other folders in the "Scripts" folder to launch scripts from, one for when the app shuts down and the other for when it starts up. Of course there is also the "ScriptUI Panels" folder as well. You may be able to save your objects and data to a temp jsx file in the startup folder to auto load the ifno when AE starts up the next time. Just a thought.
Copy link to clipboard
Copied
Just a few quick things that come to mind if David's solution doesn't work:
They're pretty unconventional and might or might not work depending on the script.
Copy link to clipboard
Copied
I would look at the XMP data part. That way you would be able to save the data that you want in the actual project.
Copy link to clipboard
Copied
Does anyone perchance have an example of editing XMP data within a script?
Copy link to clipboard
Copied
the start-up is complicated.
look in both after effects scripting guide and the javascript guide in the estk, there is some examples in there.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more