Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Saving Script Data to Project?

New Here ,
Mar 06, 2013 Mar 06, 2013

   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.

TOPICS
Scripting
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Mar 07, 2013 Mar 07, 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.

Translate
Advocate ,
Mar 07, 2013 Mar 07, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 07, 2013 Mar 07, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 07, 2013 Mar 07, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2013 Mar 07, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 07, 2013 Mar 07, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines