diff --git a/src/osgPlugins/ive/IveVersion.h b/src/osgPlugins/ive/IveVersion.h index f33de6281..b4e5c0596 100644 --- a/src/osgPlugins/ive/IveVersion.h +++ b/src/osgPlugins/ive/IveVersion.h @@ -14,7 +14,13 @@ #define VERSION_0004 4 #define VERSION_0005 5 #define VERSION_0006 6 -#define VERSION VERSION_0006 + +/* Version 7 adds read/write of the DatabasePath to the + PagedLOD node (OSG 0.9.8) */ +#define VERSION_0007 7 + + +#define VERSION VERSION_0007 /* The BYTE_SEX tag is used to check the endian diff --git a/src/osgPlugins/ive/PagedLOD.cpp b/src/osgPlugins/ive/PagedLOD.cpp index 0264897b3..c685faec2 100644 --- a/src/osgPlugins/ive/PagedLOD.cpp +++ b/src/osgPlugins/ive/PagedLOD.cpp @@ -98,7 +98,9 @@ void PagedLOD::read(DataInputStream* in){ throw Exception("Group::read(): Could not cast this osg::Group to an osg::Node."); - setDatabasePath(in->readString()); + if ( in->getVersion() > VERSION_0006 ) { + setDatabasePath(in->readString()); + } if (getDatabasePath().empty() && in->getOptions() && !in->getOptions()->getDatabasePathList().empty()) {