-
1. Re: Could plugin menu items change dynamically other than determined by PiPL resouce
Chris Cox May 9, 2011 10:24 PM (in response to Royt2011)No, sorry.
-
2. Re: Could plugin menu items change dynamically other than determined by PiPL resouce
Royt2011 May 9, 2011 11:42 PM (in response to Chris Cox)Really? that sounds so disappointing. It seems that Adobe illustrator plugins can dynamically change the menu item text, I had thought that photoshop also has the capability.
-
3. Re: Could plugin menu items change dynamically other than determined by PiPL resouce
Chris Cox May 10, 2011 10:33 AM (in response to Royt2011)As explained in the SDK: Photoshop plugins are loaded on demand.
That reduces memory usage, launch time, and the impact of bugs in the plugins.
And that means that we need to get the plugin name from the metadata (PiPL).
Illustrator loads and executes all plugins at launch - which allows them to do odd things like changing the menu name, but also slows down the launch, maximizes bug opportunity, and fills memory with plugins that you aren't even using.
-
4. Re: Could plugin menu items change dynamically other than determined by PiPL resouce
Royt2011 May 11, 2011 3:37 AM (in response to Chris Cox)So I know that after plugin loaded the related menu can't be changed, but there should be a way to choose different PiPL resource when loading plugin. Photoshop itself can be installed for different languages, and then the menu items display local language, also I saw there is a folder "C:\Program Files\Adobe\Adobe Photoshop CS5\Locales\en_GB\Additional Presets\Win\Menu Customization". Do you know how to make the Pipl resource apart from plugin binary, then the plug in can choose the right Pipl resource before loading on demand? Otherwise, if I want to build a plugin for Multi-language, I'll have to compile it many times and get many binaries.
-
5. Re: Could plugin menu items change dynamically other than determined by PiPL resouce
Chris Cox May 11, 2011 9:49 AM (in response to Royt2011)The PiPL has to be part of the binary.
Photoshop plugins use a static PiPL resource, and localizeable strings within the PiPL (ZStrings).
-
6. Re: Could plugin menu items change dynamically other than determined by PiPL resouce
Royt2011 May 12, 2011 12:47 AM (in response to Chris Cox)That's a good news. But I can't find many useful information about ZStrings in SDK documents (downloaded file: adobe_photoshop_cs5_sdk_win.zip), I only got this:
#define PIZNameProperty 0x7A6E616DL Plug-in menu name for module in PICategoryProperty sub-menu; key value is 'znam'.
This property key reflects the
ZStringNameproperty in the PiPL resource file. The data for the property has typePString; aStr255except that storage may not be present for all 255 characters. The initial length byte is present in the property.And there is also something in sample code, such as:
samplecode\imagestack\statistics\common\statistics.r(98): ZStringName { "$$$/AdobePlugin/PIPLInfo/PluginName/Mean=Mean" },
I think there should be a dictionary file outside for PS to lookup localized strings for plugin menu titles according to current codepage, or all the localized strings are placed in plugin binary. What a pity I can't find any document telling how to do this to support multi-language, in Google searching "ZStringName" returns little results. I wonder if you have any example about PiPL ZString localization?


