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

Symlink in plugin folder loads, then unloads

Explorer ,
Nov 19, 2021 Nov 19, 2021

I wrote a couple plugins for After Effects. During development, I use a symlink in the plugin folder: "C:\Program Files\Adobe\Common\Plug-ins\7.0\MediaCore\NewBlueFX". "NewBlueFX" is the sub-folder I create for my plugins.

The symlink is created by my build process:

mklink "C:\Program Files\Adobe\Common\Plug-ins\7.0\MediaCore\NewBlueFX\Exporter.aex" "Path_to_my_plugin_builds\AEExporter\Exporter.aex"

This results in a file "Exporter.aex" that Windows recognizes as Type ".symlink". After Effects sees it on startup and loads it (I see this in Visual Studio 2019 Console). But shortly after it unloads it (also seen in Console). So AE comes up and my plugin is unavailable.

This loaded in previous versions and worked fine, but with current After Effects 22.0.1 (Build 2) it always unloads and AE shows no sign of it. If I copy the file directly to the plugin folder, it works fine.

Also, I need the symlink during development because 1) It can be created from the command line as part of the build and 2) Windows has a function that lets me find the original filepath from the symlink, which I need for other modules.

Is there any way to get AE to load and not unload my plugin through the symlink?

 

Also, I've tried alternatives but none meet my needs:

- Hard symlink (mklink /H): The Windows function for the source filepath does not work with these.

- Simply copy the file: No way to find the source filepath.

- Windows shortcut: loads, can get the original path, but cannot be created from command line (during build process).

 

Thanks, Marc

TOPICS
SDK
582
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 ,
Nov 19, 2021 Nov 19, 2021

perhpas a shortcut from AE's plugin's folder instead of mediacore would work for you? (i use that and it works fine for me)

also,

WCHAR folderW[MAX_PATH];
GetModuleFileNameW((HINSTANCE)&__ImageBase, folderW, MAX_PATH);

woks for me. maybe it will work for you from a hard symolic link.

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 ,
Nov 22, 2021 Nov 22, 2021
LATEST

Thanks for the ideas. Unfortunately, no luck. Though the results are rather strange.

When I place the symbolic links in AE's specific plugin folder:

    C:\Program Files\Adobe\Adobe After Effects 2022\Support Files\Plug-ins\

The plugins load and stay loaded according to Visual Studio’s Console output. But then After Effects runs as if they were never loaded! Neither one is available.

 

My code uses GetModuleFileNameW() to get the filepath back to the symbolic link in the plugin folder. Then GetFinalPathNameByHandleW() gets me the path back to the original file in my build folder. But when it’s a hard symbolic link, GetFinalPathNameByHandleW() just returns the path back to the hard link itself.

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