From 454e2df32b0c8026b2244b3472a74865ecfac1a8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 26 Feb 2011 16:04:34 +0000 Subject: [PATCH] Fixed handling of write and reading of straight Node objects in the scene graph. --- src/osgPlugins/ive/DataInputStream.cpp | 5 +++++ src/osgPlugins/ive/DataOutputStream.cpp | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/ive/DataInputStream.cpp b/src/osgPlugins/ive/DataInputStream.cpp index 7406014dc..14717d5cf 100644 --- a/src/osgPlugins/ive/DataInputStream.cpp +++ b/src/osgPlugins/ive/DataInputStream.cpp @@ -60,6 +60,7 @@ #include "PolygonStipple.h" +#include "Node.h" #include "Group.h" #include "MatrixTransform.h" #include "Camera.h" @@ -1854,6 +1855,10 @@ osg::Node* DataInputStream::readNode() node = new osgVolume::VolumeTile(); ((ive::VolumeTile*)(node.get()))->read(this); } + else if(nodeTypeID== IVENODE){ + node = new osg::Node(); + ((ive::Node*)(node.get()))->read(this); + } else{ throwException("Unknown node identification in DataInputStream::readNode()"); } diff --git a/src/osgPlugins/ive/DataOutputStream.cpp b/src/osgPlugins/ive/DataOutputStream.cpp index ad79a6ff7..fc9d7cd54 100644 --- a/src/osgPlugins/ive/DataOutputStream.cpp +++ b/src/osgPlugins/ive/DataOutputStream.cpp @@ -62,6 +62,7 @@ #include "Light.h" #include "PolygonStipple.h" +#include "Node.h" #include "Group.h" #include "MatrixTransform.h" #include "Camera.h" @@ -1411,7 +1412,13 @@ void DataOutputStream::writeNode(const osg::Node* node) } else { - OSG_WARN<<"Unknown node in Group::write(), className()="<className()<