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:
parent
2e41e3f656
commit
d4e1a8d6a3
@ -53,8 +53,9 @@
|
||||
#define VERSION_0042 42
|
||||
#define VERSION_0043 43
|
||||
#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
|
||||
of the IVE file being read in. The IVE format
|
||||
|
@ -63,6 +63,11 @@ void ProxyNode::write(DataOutputStream* out)
|
||||
out->writeInt(getCenterMode());
|
||||
out->writeVec3(getCenter());
|
||||
|
||||
if (out->getVersion() >= VERSION_0045)
|
||||
{
|
||||
out->writeInt(getLoadingExternalReferenceMode());
|
||||
}
|
||||
|
||||
out->writeUInt(getNumFileNames());
|
||||
unsigned int numChildrenToWriteOut = 0;
|
||||
unsigned int i;
|
||||
@ -171,6 +176,11 @@ void ProxyNode::read(DataInputStream* in)
|
||||
setCenterMode((osg::ProxyNode::CenterMode)in->readInt());
|
||||
setCenter(in->readVec3());
|
||||
|
||||
if (in->getVersion() >= VERSION_0045)
|
||||
{
|
||||
setLoadingExternalReferenceMode( (osg::ProxyNode::LoadingExternalReferenceMode)in->readInt() );
|
||||
}
|
||||
|
||||
unsigned int numFileNames = in->readUInt();
|
||||
unsigned int i;
|
||||
for(i=0; i<numFileNames; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user