Hi John,

On Mon, Dec 14, 2009 at 10:21 PM, Jan Pečiva <[email protected]> wrote:
>> OSG plugin takes one look at the "foo" extension and returns an error.
>> (This is correct behavior; the .osg plugin doesn't support the "foo"
>> extension.)
>
> This is exactly the point I am trying to point out! The plugin reports that
> it does not support the extension!
>
> I am telling that this is NOT a good idea. And finally, the discussion about
> "design" ideas can start.

For your it's NOT a good idea.  So please couch it without the
capitals and within the context of your opinion, and please don't
"telling" us, we aren't children.

The alias scheme in osgDB has been a good idea for the majority for
over a decade.  Rejecting extensions that aren't supported by the
plugin is a good idea - it leaves the plugin with a complete
responsibility for what it can handle.

What you are asking is not what osgDB alias does at present, nor what
the plugins do.  The aliases at present are based around the idea that
plugins with a different name can handle extensions that are named
different from the plugin.  This allows a tif plugin to handle tiff
files, or the quicktime to handle .mov, .mpg etc. etc.

The osgDB alias is not a scheme for co-opting an existing plugin to
handle a file extensions that isn't a recognized one.  One might
propose an additional scheme for doing this, and we might debate the
merits of this, personally I'm rather dubious that it's that a great
thing to do, and given we've gone a decade without needing this I
would suggest that it's not at all a common requirement.

I don't know if you are aware but one way of tackling what you are
trying might simply have your own plugin as your were originally
talking about and have it open the file you want with whatever
extensions you have as an istream and then load the plugin you want to
do the actual loaded and pass this to it.  Given what you after is
such a niche requirement then I would think this is a sensible route
to take rather than expect intrusive changes to the OSG to achieve
what you specifically want.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to