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.

>I could perhaps see that this behavior is
> part of the definition of some file formats, and that would make me grumpy, 
> but it's
> inconsistent with the treatment of data file paths when they are set directly 
> in the
> Registry object. Currently the only way to set a path that will be used to 
> search for
> referenced files seems to be to set the path in the registry directly.

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.

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.

Robert.

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

Reply via email to