diff --git a/src/osgPlugins/osgTerrain/HeightFieldLayer.cpp b/src/osgPlugins/osgTerrain/HeightFieldLayer.cpp index 71d3a8d6b..9d3e26d12 100644 --- a/src/osgPlugins/osgTerrain/HeightFieldLayer.cpp +++ b/src/osgPlugins/osgTerrain/HeightFieldLayer.cpp @@ -20,7 +20,7 @@ osgDB::RegisterDotOsgWrapperProxy HeightFieldLayer_Proxy ( new osgTerrain::HeightFieldLayer, "HeightFieldLayer", - "Object HeightFieldLayer Layer", + "Object Layer HeightFieldLayer", HeightFieldLayer_readLocalData, HeightFieldLayer_writeLocalData ); diff --git a/src/osgPlugins/osgTerrain/ImageLayer.cpp b/src/osgPlugins/osgTerrain/ImageLayer.cpp index 7ccccc2e6..ac531e167 100644 --- a/src/osgPlugins/osgTerrain/ImageLayer.cpp +++ b/src/osgPlugins/osgTerrain/ImageLayer.cpp @@ -20,7 +20,7 @@ osgDB::RegisterDotOsgWrapperProxy ImageLayer_Proxy ( new osgTerrain::ImageLayer, "ImageLayer", - "Object ImageLayer Layer", + "Object Layer ImageLayer", ImageLayer_readLocalData, ImageLayer_writeLocalData ); diff --git a/src/osgPlugins/osgTerrain/Terrain.cpp b/src/osgPlugins/osgTerrain/Terrain.cpp index f9154cda6..8539cef82 100644 --- a/src/osgPlugins/osgTerrain/Terrain.cpp +++ b/src/osgPlugins/osgTerrain/Terrain.cpp @@ -118,6 +118,12 @@ bool Terrain_readLocalData(osg::Object& obj, osgDB::Input &fr) bool itrAdvanced = false; + osg::ref_ptr readObject = fr.readObjectOfType(osgDB::type_wrapper()); + if (readObject.valid()) itrAdvanced = true; + + osgTerrain::Locator* locator = dynamic_cast(readObject.get()); + if (locator) terrain.setLocator(locator); + if (fr.matchSequence("ElevationLayer {")) { int entry = fr[0].getNoNestedBrackets(); @@ -289,7 +295,7 @@ bool Terrain_readLocalData(osg::Object& obj, osgDB::Input &fr) itrAdvanced = true; } - osg::ref_ptr readObject = fr.readObjectOfType(osgDB::type_wrapper()); + readObject = fr.readObjectOfType(osgDB::type_wrapper()); if (readObject.valid()) { terrain.setTerrainTechnique(dynamic_cast(readObject.get()));