-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Osfield wrote:
> On Dec 9, 2007 8:30 AM, Tim Moore <[EMAIL PROTECTED]> wrote:
>> Hi,
>> The ac plugin, along with several others, creates a clone of the passed 
>> options object
>> and then does local_opt->setDatabasePath(osgDB::getFilePath(fileName) in 
>> order to be
>> able to find local internally referenced files. This causes any data path 
>> list passed in as
>> options to be be ignored. Is this intentional?
> 
> This is what the contributors to the ac plugin have found worked best
> for them.  The same goes for other formats.
> 
...
> Just relying upon the path in available from the Registry is that it
> won't work for file format that reference external files that are
> relative to those files, which is why you find code like in the ac
> plugin.  So adding the path is important.
> 
I understand that it's important to add the directory of the file being read to 
the path,
but I don't see why other directories in the search path should be blown away 
to do that,
especially since alternate directories remain in the Registry search path. If an
application wants to specify, for example, a directory where a model's textures 
are to
be found, it now has to set the path in the Registry to do that. I'd think that 
you'd
want to avoid changes to the registry which prevent any possibility of thread 
safety in
the readers.

Tim
> Perhaps one way to get round cases where the relative paths are broken
> by users moving files around to new locations in inconsistent ways is
> to prepend the database path lists by the new path so that its the
> first directory to be checked, and inherit the path passed in from
> Registry.  This is something that would need to tweaked in each of the
> affected plugins. A convenience method could probably be written into
> ReaderWriter::Options to minimize the effort.

I agree with this if you mean "inherit the path passed in via options."

Tim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHW+f4eDhWHdXrDRURAsk3AKDCGis1u/J4fiTcdekERtuK/JW46gCghsU2
V8kHMAzYCNgLxD/5YvM5yKs=
=37cx
-----END PGP SIGNATURE-----
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to