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

fsName of Prefs-indep-general.txt

Participant ,
Oct 03, 2021 Oct 03, 2021

I'm currently working on a lookup and recoding of AE color information, like so many before me:

 

https://community.adobe.com/t5/after-effects-discussions/set-new-default-solids-folder-with-javascri...
https://community.adobe.com/t5/after-effects-discussions/get-label-colors-from-pref/m-p/7716338
https://community.adobe.com/t5/after-effects-discussions/read-and-modify-ae-preferences/m-p/5229040

 

Because of all the problems the getPrefsAsAntything() approach brings with it, I'm also doing the suggested workaround with the selfbuilt encoder and line by line reading of the txt. How to do that is not the problem, I've got that covered. But what I'm looking for atm is how to find the correct indep-general file.

 

Is there a way to let AE tell me what prefs file its currently using? Something like app.project.file.fsName, but for the indep-general? I want to avoid any problems with special notations of the filename, e.g. a french "Préfs". And also to exlude the possibility that e.g. the system folder is not on C: on Windows and so on.

TOPICS
Error or problem , How to , Scripting , SDK
937
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
Community Expert ,
Jan 06, 2022 Jan 06, 2022

Unfortunately there's not an easy way to get the prefs filepath from AE. Instead, you need to build it on your own and then read the file. 

 

Mac: users/[username]/Library/Preferences/Adobe/After Effects/[version]/

Win: C:\Users\[username]\AppData\Roaming\Adobe\After Effects\[version]\

 

And since the names can change per region (the word "Prefs"), just look for the latest modified files starting with "Adobe After Effects" and ending with the specific prefs file ending "-indep-render.txt",  "-indep-general.txt", etc.

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
Participant ,
Jan 06, 2022 Jan 06, 2022

Now that's really smart to look for the latest modified file. I've been always just checking for all kinds of "Prefs" translations which seems somewhat unreliable since I was also missing some translations. Thanks! 🙂

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
Community Expert ,
Jan 06, 2022 Jan 06, 2022

Sure thing, yea finding the latest version solves a bunch of issues.

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
Participant ,
Jan 07, 2022 Jan 07, 2022

Neat Idea justin 🙂

 

Already found it in the API, now I jsut have to include it in my code. thx!

https://extendscript.docsforadobe.dev/file-system-access/file-object.html#file-class-properties

CorvinusCorax_0-1641552627986.png

 

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
Community Expert ,
Jan 07, 2022 Jan 07, 2022

nice!

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
Community Expert ,
May 21, 2023 May 21, 2023

In case anybody else runs into this issue:

I just noticed that when you run Ae the very first time, the preferences files may not exist, yet, and will only be created after you close Ae the first time. So if the files cannot be found, you might want to show a message saying that if Ae has been launched the very first time you need to restart it.

 

 
 
Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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
Community Expert ,
May 22, 2023 May 22, 2023
LATEST

Good to know 👍

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