Hi Terry,

The intention is that the DatabasePathList from the parent read operation
provides the path when available before the Registry's DatabasePathList
(one set by OSG_FILE_PATH) allow it to override it, if the files aren't
found then one should fallback to the Registry's DatabasePathList.  The
code looks correct to me.

Robert,

On 24 July 2013 05:57, Terry Welsh <[email protected]> wrote:

> Was curious about the way referenced files are searched for. There's
> this block of code at Registry.cpp line 1002. It appears to use the
> file path of a parent file to search for referenced files.
>
> if (options && !options->getDatabasePathList().empty())
>     {
>         fileFound = findFileInPath(filename,
> options->getDatabasePathList(), caseSensitivity);
>         if (!fileFound.empty()) return fileFound;
>
>         if
> (osgDB::containsCurrentWorkingDirectoryReference(options->getDatabasePathList()))
>         {
>             pathsContainsCurrentWorkingDirectory = true;
>         }
>
>     }
>
> As long as this code block is there, referenced files are not searched
> for in the order specified in OSG_FILE_PATH. The code block
> immediately following this one searches all of OSG_FILE_PATH, so if
> you comment out this code block the order in OSG_FILE_PATH is
> respected for all files which is more consistent. Is this
> inconsistency intentional or should this code block be removed?
> --
> Terry Welsh
> www.reallyslick.com
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to