fsName of Prefs-indep-general.txt

Participant ,
Oct 03, 2021 Oct 03, 2021

Copy link to clipboard

Copied

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

Views

104

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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! 🙂

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

nice!

Likes

Translate

Translate

Report

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