Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    May 2017
    Posts
    6
    Post Thanks / Likes
    Mentioned
    0 Post(s)
    Activity
    Points
    53
    Level
    2
    Lv. Percent
    55%

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

    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\photosh op /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:

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

  2. #2
    Guru MrToM's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    3,503
    Post Thanks / Likes
    Mentioned
    208 Post(s)
    Activity
    Points
    14,962
    Level
    35
    Lv. Percent
    31.66%
    Achievements AdvocatePost VisionaryCelebrityQualified to Freelance
    Awards FreelancerScholarChallenge WinnerChallenge CreatorPhotoshop Guru

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

    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. #3
    Junior Member
    Join Date
    May 2017
    Posts
    6
    Post Thanks / Likes
    Mentioned
    0 Post(s)
    Activity
    Points
    53
    Level
    2
    Lv. Percent
    55%

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

    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!
    [C++] A little advice for my Photoshop plugin (Not seeing it loading)-pasted-image-2017_05_01-05_15-pm-png
    Last edited by i73; 05-01-2017 at 07:59 PM.

  4. #4
    Junior Member
    Join Date
    May 2017
    Posts
    6
    Post Thanks / Likes
    Mentioned
    0 Post(s)
    Activity
    Points
    53
    Level
    2
    Lv. Percent
    55%

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

    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\inclu des /EP /DMSWindows=1 /DWIN32=1 /Tc $(PluginDir)\PhotoshopPluginListener\ListenerPIPL. r > $(OutputPath)$(AssemblyName).rr
    $(SolutionDir)PhotoshopPluginListener\Cnvtpipl.exe $(OutputPath)$(AssemblyName).rr $(OutputPath)$(AssemblyName).pipl

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About Photoshop Gurus
Photoshop Gurus (PSG) is a friendly community of designers and artists who enjoy all things related to Photoshop. PSG can consider itself one of the oldest Photoshop sites and has recently had it's 10th anniversary. We've come a long way and have every intention to continue supporting the Photoshop community. Photoshop can be an overwhelming program for beginners and that's how we try to help. We have a friendly forum, tutorials and all resources to help you understand this wonderful program. Feel free to look around and if you have any questions, don't hesitate to ask. Happy browsing!