File extension for plugin interface

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
ericgross
Posts: 2
Joined: Mon Mar 28, 2005 5:34 pm

File extension for plugin interface

Post by ericgross »

Hi all,

I'm not sure if perhaps I'm missing the obvious, or just haven't tried the right combination, but I can't figure out any way via the plug-in interface to specify that a plugin can have more than one default file extension. I don't particularly if Dplot only uses one of them as a preliminary check to determine which plugin to use when you drag a file in (as the typecheck function takes care of it), but I want to specify multiple file extensions to appear in the File Open dialog. I tried specifying the extensions using the "|ext1|ext2||" notation, using various seperators, etc with no luck. It seems like allowing the plugin to specify multiple extensions to show up in the File Open would be real simple to add.

Thanks,
-Eric Griss
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Eric,
It's not obvious at all, this was an oversight on my part when I first worked on the interface but it IS doable currently. I'll probably end up modifying this so that's it's not quite so clumsy (w/o breaking the current scheme), but this will work. From the Bitmap to 3D plugin:

Code: Select all

__declspec(dllexport) int plugin_init( char *Desc, char *DefExt, int *DataType )

strcpy(DefExt,".bmp;*.gif;*.jpg;*.png;*.tga;*.tif");
Notice that the first extension is w/o a '*', while all others include it.

On drag-and-drop, it isn't DPlot that's determining whether a plugin will work with the file but your plugin's _typecheck function, so this has no effect there.
Visualize Your Data
support@dplot.com
ericgross
Posts: 2
Joined: Mon Mar 28, 2005 5:34 pm

Post by ericgross »

DPlotAdmin wrote:Eric,
It's not obvious at all, this was an oversight on my part when I first worked on the interface but it IS doable currently. I'll probably end up modifying this so that's it's not quite so clumsy (w/o breaking the current scheme), but this will work. From the Bitmap to 3D plugin:

Code: Select all

__declspec(dllexport) int plugin_init( char *Desc, char *DefExt, int *DataType )

strcpy(DefExt,".bmp;*.gif;*.jpg;*.png;*.tga;*.tif");
Notice that the first extension is w/o a '*', while all others include it.

On drag-and-drop, it isn't DPlot that's determining whether a plugin will work with the file but your plugin's _typecheck function, so this has no effect there.
Thanks, I tried many permutations but none with the "*" missing on only the first one. That worked great!

-Eric
Post Reply