Skip to main content
Participant
July 16, 2013
Question

How can i create a filechooser button inside the plugin window?

  • July 16, 2013
  • 1 reply
  • 1293 views

Hi

i'd like to create a filechooser button to load/save but inside the plugin window. Is it possible ? if yes how can i do that ?

and i need the algorithm to be Mac/Windows compatible if possible

thanks a lot

*best regards*

Jeff

This topic has been closed for replies.

1 reply

ilvar
Inspiring
July 16, 2013

If by the "plugin window" you mean the dialog an automation or a filter plugin from the SDK sample code opens for you, you have to write platform-specific code using either Cocoa on Mac or regular WinAPI on Windows (e.g. by hooking GetOpenFileName()/GetSaveFileName() functions to a button you will add to the resource file or create dynamically). Take a look at any plugin that has a GUI (e.g. the Dissolve plugin) and you'll see that the GUI code is entirely platform-specific as there is no platform-independed GUI framework bundled with Photoshop anymore.

Another option is to use some third-party cross-platform library such as Qt, but if you just need a couple of buttons and file selection dialogs it's probably not worth the trouble,.

Participating Frequently
July 17, 2013

thanks you very much

i looked and found GTK+ also but it's written in C (i know there is a c++ wrapper but) also i need a gradient selector so i think QT is the right choice.

thanks a lot

Jeff

Participating Frequently
July 18, 2013

Hi again

I've tried to make Qt working. I managed to get it compiled without errors but when i try to call the new window (a very basic one) Photoshop crashes.

I have no idea where to go now.

please help me!

Jeff