Skip to main content
Participant
March 6, 2013
解決済み

Saving Script Data to Project?

  • March 6, 2013
  • 返信数 3.
  • 1275 ビュー

   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.

このトピックへの返信は締め切られました。
解決に役立った回答 chauffeurdevan

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.

返信数 3

Inspiring
March 7, 2013

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.

Dimn7211作成者
Participant
March 7, 2013

Does anyone perchance have an example of editing XMP data within a script?

Inspiring
March 7, 2013

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.

999klustre_
Inspiring
March 7, 2013

Just a few quick things that come to mind if David's solution doesn't work:

  1. You can save the state of the script to the preferences and give it an specific ID. Most of Jeff Almasol's scripts save to the preferences, so you can check those for reference.
  2. Perhaps you can save the data to a txt/jsx in the projects folder and read it in.
  3. Or save the data in the actual project in a textlayer?
  4. Or perhaps you can add specific ID's to the comments field of the layers.

They're pretty unconventional and might or might not work depending on the script.

Legend
March 7, 2013

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.