View previous topic :: View next topic |
Author |
Message |
ericgross
Joined: 28 Mar 2005 Posts: 2
|
Posted: Mon Mar 28, 2005 5:40 pm Post subject: File extension for plugin interface |
|
|
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 |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Mon Mar 28, 2005 6:06 pm Post subject: |
|
|
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: | __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 |
|
Back to top |
|
|
ericgross
Joined: 28 Mar 2005 Posts: 2
|
Posted: Mon Mar 28, 2005 8:54 pm Post subject: |
|
|
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: | __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 |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|