I'm currently working on a lookup and recoding of AE color information, like so many before me:
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.
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.
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! 🙂
Sure thing, yea finding the latest version solves a bunch of issues.