Skip to main content
Uflex2flex
Participant
December 13, 2012
Answered

Filter plugin not loaded everytime

  • December 13, 2012
  • 1 reply
  • 1033 views

Hi,

I am currently writing a filter Plug-in for Photoshop but I'm having an issue and can't find any clue of what is causing it.

My plugin is sometimes loaded by photoshop and sometimes not. When it is not, deleting the 8bf file and doing a rebuild of the project works, without modifying anything in the code. Sometimes I have to rebuild many times until the plugin gets loaded, which is anoying...

First I checked that the sdk version in the .r file was correct: Version { (latestFilterVersion << 16 ) | latestFilterSubVersion }, the entry point is the same as in the dissolve example.

I thought that photoshop may cache the plugins to load them faster and that the new version isn't seen (like when I build many times a minute), but I figured out that when a plugin is loaded once, it is always recognized.

One thing that I've noticed is that when my plugin is loaded, if I go to Help > System Info..., there is no version number for my plugin, that may cause the issue but I can't find in the dissolve example where this version 13 comes from. I thought as well that maybe the resource isn't compiled correctly sometimes but it is strange and unlikely I think (maybe still worth mentionning).

Does anybody have any clue / suggestion? It's been 2 days that I'm trying to figure out what's going on and it starts to drive me crazy...

This topic has been closed for replies.
Correct answer

Hi

Are you developing for Windows or Mac?

I had a similar problem with Windows.  I found I wasn't compiling the correct pipl files (my .rc file wasn't including the correct pipl files).  Tidy up/delete any pipl files and make sure 100% you're including correct pipl files.

I also had a problem when switching between 32/64 bit builds.  For example, when compiling a 64 bit plug-in, VS2010 would sometimes not force a rebuild for the .r file (to generate .pipl for 64 bit) and would then include the 32 bit pipl (leftover from the 32 bit build).  This meant that my plugin wouldn't appear in 64 bit Photoshop (because the pipl was invalid).  For me the solution is to either delete any old pipl files before compiling, or being mindful to do a rebuild of pipl files when switching from 32/64 bit builds.  I could also have created separate pipl builds for 32/64 bit and made sure correct one was being included.

When the plug-in doesn't appear in Photoshop, eliminate all the obvious bits (like plug-in paths), check your DLL exports, then check the pipl.  I don't think it's the version number, but someone with more experience than me might point you in a better direction.

Jamie

1 reply

Correct answer
December 13, 2012

Hi

Are you developing for Windows or Mac?

I had a similar problem with Windows.  I found I wasn't compiling the correct pipl files (my .rc file wasn't including the correct pipl files).  Tidy up/delete any pipl files and make sure 100% you're including correct pipl files.

I also had a problem when switching between 32/64 bit builds.  For example, when compiling a 64 bit plug-in, VS2010 would sometimes not force a rebuild for the .r file (to generate .pipl for 64 bit) and would then include the 32 bit pipl (leftover from the 32 bit build).  This meant that my plugin wouldn't appear in 64 bit Photoshop (because the pipl was invalid).  For me the solution is to either delete any old pipl files before compiling, or being mindful to do a rebuild of pipl files when switching from 32/64 bit builds.  I could also have created separate pipl builds for 32/64 bit and made sure correct one was being included.

When the plug-in doesn't appear in Photoshop, eliminate all the obvious bits (like plug-in paths), check your DLL exports, then check the pipl.  I don't think it's the version number, but someone with more experience than me might point you in a better direction.

Jamie

Uflex2flex
Participant
December 14, 2012

Hi Jamie

Yes, I am developing for Windows for now (I will port the plugin to Mac later). I figured out  that sometimes the pipl resource isn't included into the plugin. As it could be usefull for others, I used ResEdit (available at http://www.resedit.net/ for free) to check if the resources were correctly embedded. Just by modifying the .rc file, the resource is compiled again and bundled into the plugin and it works. I need to find a way to compile this resource correctly but at least now even if I don't have a solution to that I have a workaround...

Oh and btw, I am using QtCreator, not Visual Studio. I thought that it would make it easier to port the plugin to Mac later on.

Regarding the version number, I had removed everything related to the about dialog, and the version number comes from an SDK resource file in samplecode/common/resources/About.rc

Thank you Jamie, I should have asked before, it would have probably save me some time