DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File extension for plugin interface

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
ericgross



Joined: 28 Mar 2005
Posts: 2

PostPosted: Mon Mar 28, 2005 5:40 pm    Post subject: File extension for plugin interface Reply with quote

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
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Mar 28, 2005 6:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ericgross



Joined: 28 Mar 2005
Posts: 2

PostPosted: Mon Mar 28, 2005 8:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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