Copy link to clipboard
Copied
my code like this, to load plugin and run function in bundle.
if (g_bundlePath == nullptr) {
g_bundlePath = CFSTR("/Applications/test.plugin");
CFURLRef bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, g_bundlePath, kCFURLPOSIXPathStyle, true);
g_bundle = CFBundleCreate(kCFAllocatorDefault, bundleURL);
if (g_bundle) {
bool success = CFBundleLoadExecutable(g_bundle);
}
}
if (g_bundlePath != nullptr) {
typedef void (*PLUGINPROC)(const int16, void*, intptr_t*, int16*);
PLUGINPROC mainProc = (PLUGINPROC)CFBundleGetFunctionPointerForName((CFBundleRef)g_bundle, CFSTR("PluginMain"));
mainProc(selector, filterRecord, data, result);
}
return ;
but those icons in resource directory cant display on ui, is there any problem my code?
Copy link to clipboard
Copied
You seem to be mixing up plug-ins with executables. You do not load Photoshop plug-ins. You do not run Photoshop plug-ins. Photoshop plug-ins are not installed in /Applications.
Photoshop plug-ins are installed into a Photoshop plug-ins folder. They are loaded by Photoshop. They are run by Photoshop, for example when the user chooses a filter or a menu.
Copy link to clipboard
Copied
Yes, as you said, I saw an executable file in the plugin directory. Photoshop cant run the plugin,so Im doing some tests. May I ask if the method I used to load this executable file is correct? Why can't I load the resource file display on UI?
Copy link to clipboard
Copied
this way can display UI ,but icons in resource direcotry not display on UI
Find more inspiration, events, and resources on the new Adobe Community
Explore Now