HI David,

I have just review your proposed changes and for now will reject it on
grounds that it likely break the loading of models for end users for one
users specific needs, when those needs would be better solved elsewhere.
Hard-wiring this behaviour into a specific plugin when it's a general
problem isn't appropriate.

If the paths when you write out are absolute and you want them relative
then think an option when writing out files that computes the relative
path, leaves the absolute path or just uses the path would be appropriate.
Or perhaps post processing the Image's assigned to a scene graph to do this.

Cheers,
Robert.

On 28 January 2015 at 16:02, David Callu <[email protected]> wrote:

> Hi Robert
>
> I currently use OpenFlight plugin to convert .flt to .osgt file and all
> relative path are replaced by absolute path.
> So .osgt created are filesystem dependant.
>
>
>
> problem:
> OpenFlight plugin search absolute path for any image filename to get an
> unique ID
> for each image and cache them to not read a texture twice.
>
> src/osgPlugins/OpenFlight/PaletteRecords.cpp:l468
>         // Need full path for unique key in local texture cache.
>         std::string pathname = osgDB::findDataFile(filename,document.
> getOptions());
>
> the new pathname if valid is use in osgDB::ReadRefImageFile and so
> absolute path is kept in Image object.
>
>
> proposed fix:
> pass filename instead of pathname to osgDB::ReadRefImageFile.
>
>
> Cheers
> David
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to