[C++] A little advice for my Photoshop plugin (Not seeing it loading)

#1
Hello, I am seeking some help with loading my plugin, I don't know if it's a build error or if I am messing up some settings.
Currently it's building my .8bc without errors but there is little debugging I can do to see where it's being unloaded. Am I not seeing it "Loaded" because I'm not doing anything with it?

I'll just toss up my stuff and see if anyone can notice what's happening and give me some advice:

Plugin.r

Code:
#include "PIDefines.h"#ifdef __PIMac__
#include "PIGeneral.r"
#elif defined(__PIWin__)
#include "PIGeneral.h"
#endif
resource 'PiPL' ( 16000, plugInName, purgeable)
{
  {
  Kind { Actions },
  Name { "Auto" },
  Category { "SDK Example" },
  Version { (latestActionsPlugInVersion << 16) | latestActionsPlugInSubVersion },
  #ifdef __PIMac__
  CodePowerPC { 0, 0, "" },
  #elif defined(__PIWin__)
  CodeWin32X86 { "PluginMain" },
  #endif
  }
};
Command line settings for Plugin.r:

CL /I $(SolutionDir)PhotoshopPlugin\photoshopapi\photoshop /I $(SolutionDir)PhotoshopPlugin\photoshopapi\pica_sp /I $(SolutionDir)PhotoshopPlugin\common\includes /DMSWindows=1 /EP /Tc%(FullPath) > $(SolutionDir)\$(AssemblyName).rr
$(SolutionDir)PhotoshopPlugin\Cnvtpipl.exe $(SolutionDir)\$(AssemblyName).rr $(SolutionDir)\\$(AssemblyName).pipl

PhotoshopPlugin.cpp:

Code:
#include "PhotoshopPlugin.h"
#include "PIAbout.h"


DLLExport MACPASCAL void PluginMain(
  const int16 selector,
  void * filterRecord,
  intptr_t * data,
  int16 * result)
{
  try {
    if (selector == plugInSelectorAbout)
    {
      Ptr pointer = NULL; 
    }
  }
  catch (...)
  {


  }
}
Build Configurations:

Screenshot_23.png
 
#2
Hmmm....are you sure Photoshop accepts this *.8bc plugin type?

Personally I've never seen a *.8bc type before but that's not to say they don't exist.


Official plugin types approved by Adobe are:

*.8bf (filter)
*.8ba (import or 'acquisition')
*.8be (export)
*.8bi (file format)
*.8ly (automation)


There are also:
*.8bs (selection)
*.8by (parser)

...but nobody other than Adobe have ever used them.

Regards.
MrToM.
 
#3
I got really excited, because I did look and it seems that the extension was not part of the list, (I have no idea where I got that then...) But unfortunatly this was not the solution, I tried '8ba, 8bi' and nothing. :/ Thank you for the suggestion while it did solve one issue.

I have update my source a little as well:

Code:
// PhotoshopPlugin.cpp : Defines the exported functions for the DLL application.//#include "stdafx.h"
#include "PhotoshopPlugin.h"
#include "SPInterf.h"
#include "SPBasic.h"
#include "PIUSuites.h"


DLLExport SPAPI SPErr PluginMain(
  const char* caller,
  const char* selector, 
  const void* data)
{
  SPErr error = kSPNoError;
  SPBasicSuite* sSPBasic = NULL;
  SPMessageData *basicMessage = NULL;
  basicMessage = (SPMessageData *)data;
  sSPBasic = basicMessage->basic;
 
  //// check for SP interface callers
  if (sSPBasic->IsEqual((char*)caller, kSPInterfaceCaller))
  {
    if (sSPBasic->IsEqual(
      (char*)selector, kSPInterfaceAboutSelector))
    {


    }
  }


  if (sSPBasic->IsEqual((char*)caller, kPSPhotoshopCaller))
  {
    if (sSPBasic->IsEqual((char*)selector, kPSDoIt))
    {
      //pop a dialog to show plug-in works
      //sADMBasic->MessageAlert("Auto Automation Plug-In");
    }
  }


  return error;
}
But it seems "sADMBasic" is depreciated and I now have to call my own UI...

Any further suggestions would be great!
Pasted image at 2017_05_01 05_15 PM.png
 
Last edited:
#4
This has been resolved, it had to do with building out the Command Line build commands:

CL /I $(SolutionDir)PhotoshopPluginListener\photoshopapi\photoshop /I $(SolutionDir)PhotoshopPluginListener\photoshopapi\pica_sp /I $(SolutionDir)PhotoshopPluginListener\common\includes /EP /DMSWindows=1 /DWIN32=1 /Tc $(PluginDir)\PhotoshopPluginListener\ListenerPIPL.r > $(OutputPath)$(AssemblyName).rr
$(SolutionDir)PhotoshopPluginListener\Cnvtpipl.exe $(OutputPath)$(AssemblyName).rr $(OutputPath)$(AssemblyName).pipl