kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #23582
Re: pcbnew file import plugins
For a moment there I thought you meant the 3D plugins - but what you say
is equally applicable to 3D model files. At the moment the filtering is done
(almost) exclusively via the extension and in practice that's enforced on
MSWin but on *NIX filesystems there is really no concept of file type
extensions.
In the example of legacy kicad vs Eagle6 (and in fact many other ECAD
*.pcb files) it would be good to have such a function to test if the file
is a type supported by the module.
- Cirilo
On Wed, Mar 2, 2016 at 7:21 PM, Simon Wells <swel024@xxxxxxxxx> wrote:
> After looking into and discussing
> https://bugs.launchpad.net/kicad/+bug/1551628 with nick i am not sure
> the filter is the best way of advising kicad of which plugin to use
>
> I was thinking the best way to solve this would be for each of the
> plugins to have a static
> "bool CanYouHandleThis( FILE )"
> function (obviously with a better name) and when a file is loaded each
> of the plugins are checked to see if they understand the file,
>
> With each of the responses if they are all no, then a error can be
> reported, and for any that are yes the loading can then be handed off
> to it/them (if dynamic plugins are enabled at some point in the future
> (which you would really need some sort of what can you read interface
> anyway) then you may get to the point where multiple can handle a
> single file)
>
> This would allow the user to not have to set the filter which i am not
> sure many people would think as the problem anyway as far as i am
> aware its not the normal method for setting what type a file is. And
> also move away from blindly trusting extensions
>
> Thanks
>
> Simon
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
References