Copy link to clipboard
Copied
I need to identify the version of AE my plugin is running on. I can get the version number using major and minor versions from the PluginMain function.
However, I need the version String, like "After Effects CC 2017", "After Effects CC 2018", etc. I need this because I have to create a list of user presets, and for that reason I have to know the full path to the user presets so I can look for ffx files in there.
i don't know of a direct way to get the app version as a string. however,
if your plug-in is installed in each AE version's plug-ins folder then use:
A_UTF16Char wPath[AEFX_MAX_PATH];
PF_GET_PLATFORM_DATA (PF_PlatData_EXE_FILE_PATH_W, wPath);
which gives you the path to your plug-in files. from there you can decipher
AE's version from the file path. (if you'll need it at all after having the
path to your plug-in)
Copy link to clipboard
Copied
i don't know of a direct way to get the app version as a string. however,
if your plug-in is installed in each AE version's plug-ins folder then use:
A_UTF16Char wPath[AEFX_MAX_PATH];
PF_GET_PLATFORM_DATA (PF_PlatData_EXE_FILE_PATH_W, wPath);
which gives you the path to your plug-in files. from there you can decipher
AE's version from the file path. (if you'll need it at all after having the
path to your plug-in)
Copy link to clipboard
Copied
That's almost the same thing I'm doing right now. But I use some other way to get the plugin path.
My only concern with this approach is, if AE is not installed in the default location. Is it possible to install AE in any other directory that does not include the default "After Effects CC 2019"?
Edit: Turns out that at least in the latest CC versions of AE, The main folder for the program always is "After Effects CC [version]", So this is probably a safe way to get the name.
Thanks!!
Copy link to clipboard
Copied
i don't think it's possible, but i'm not 100% sure. however, you can count
to the "Presets" folder being in the same folder as AfterFX.exe.
you can look far that file along your plug-in's path instead of looking for
"After Effects CC 20XX". another way to go about this issue is to look in
the machines registry on windows and library on mac to see where AE is
installed.
mac: /Library/Preferences/com.Adobe.After Effects.paths.plist
win: HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\After Effects\
Copy link to clipboard
Copied
Thanks shachar carmi,
I Indeed look into the registry to get the path for the presets, however, for the "user presets", those that are stored in the Documents for each user, I can't get the path from anywhere, that's why I needed to know the version label.
But anyway, seems like the "After Effects CC [version]" is always part of the AE's path and I can get the string from there.
Copy link to clipboard
Copied
Can I ask how you access 'AE's path' as you've said here?