Hi Folks,
having some troubles with the PathHandler functionality of OpenSG
I was wondering two things:
1. Why does the PathHandler not support absolute paths.
(At least in Windows it is not possible to search for an
absolute path including volume letter)
This resulted in some workarounds in the OpenSG core code and
imho. does not make any sense because it can rather easily
incorporated in the PathHandler.
2. Why do I explicitly have to add the current directory to the
PathHandler. O.K. this is rather come inconvenience but it is
not the behaviour I would expect.
Anyone of the Core-Team to take this question?
Manfred.
BTW. Find attached a patch that allows the DATImageFile handler to
also use the PathHandler functionality.
======================================================================
Manfred Weiler [EMAIL PROTECTED]
Visualisierung und Interaktive Systeme Telefon: 0711/7816-208
Universitaet Stuttgart, IfI FAX: 0711/7816-340
Index: OSGDATImageFileType.cpp
===================================================================
RCS file: /cvsroot/opensg/OpenSG/Source/System/Image/OSGDATImageFileType.cpp,v
retrieving revision 1.7
diff -r1.7 OSGDATImageFileType.cpp
51a52,54
> #include <OSGImageFileHandler.h>
> #include <OSGPathHandler.h>
> #include <OSGFileSystem.h>
222c225,233
< if (inVol)
---
> if (inVol.fail() &&
> ImageFileHandler::the().getPathHandler())
> {
> // Try to find the file in the search
> path
> inVol.clear(); // reset the error state
> PathHandler * ph =
> ImageFileHandler::the().getPathHandler();
>
> inVol.open(ph->findFile(objectFileName.c_str()).c_str(),
> std::ios::in |
> std::ios::binary );
> }
> if (inVol.good())
236,237c247,248
< FWARNING (( "Can not open %s image data\n",
< objectFileName.c_str() ));
---
> FLOG (( "Can not open %s image data\n",
> objectFileName.c_str() ));