From Lilin Xiong, "When writing proxyNode to ive file, we forget "LoadingExternalReferenceMode ". Add some code to fix this.

if (out->getVersion() >= VERSION_0045)
{
    out->writeInt(getLoadingExternalReferenceMode());
}

if (in->getVersion() >= VERSION_0045)
{
   setLoadExternalReferenceFiles( (osg::ProxyNode::LoadingExternalReferenceMode)in->readInt() );
}
"
This commit is contained in:
Robert Osfield 2013-06-28 14:32:12 +00:00
parent 2e41e3f656
commit d4e1a8d6a3
2 changed files with 12 additions and 1 deletions

View File

@ -53,8 +53,9 @@
#define VERSION_0042 42 #define VERSION_0042 42
#define VERSION_0043 43 #define VERSION_0043 43
#define VERSION_0044 44 #define VERSION_0044 44
#define VERSION_0045 45
#define VERSION VERSION_0044 #define VERSION VERSION_0045
/* The BYTE_SEX tag is used to check the endian /* The BYTE_SEX tag is used to check the endian
of the IVE file being read in. The IVE format of the IVE file being read in. The IVE format

View File

@ -63,6 +63,11 @@ void ProxyNode::write(DataOutputStream* out)
out->writeInt(getCenterMode()); out->writeInt(getCenterMode());
out->writeVec3(getCenter()); out->writeVec3(getCenter());
if (out->getVersion() >= VERSION_0045)
{
out->writeInt(getLoadingExternalReferenceMode());
}
out->writeUInt(getNumFileNames()); out->writeUInt(getNumFileNames());
unsigned int numChildrenToWriteOut = 0; unsigned int numChildrenToWriteOut = 0;
unsigned int i; unsigned int i;
@ -171,6 +176,11 @@ void ProxyNode::read(DataInputStream* in)
setCenterMode((osg::ProxyNode::CenterMode)in->readInt()); setCenterMode((osg::ProxyNode::CenterMode)in->readInt());
setCenter(in->readVec3()); setCenter(in->readVec3());
if (in->getVersion() >= VERSION_0045)
{
setLoadingExternalReferenceMode( (osg::ProxyNode::LoadingExternalReferenceMode)in->readInt() );
}
unsigned int numFileNames = in->readUInt(); unsigned int numFileNames = in->readUInt();
unsigned int i; unsigned int i;
for(i=0; i<numFileNames; i++) for(i=0; i<numFileNames; i++)