From dfc1a899dbfcc071b8f8df4d05005531409e1b83 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 27 Jun 2013 13:37:26 +0000 Subject: [PATCH] Added Geometry::containsDeprecatedData() / fixDeprecatedData() --- src/osgDB/Input.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osgDB/Input.cpp b/src/osgDB/Input.cpp index b2f1ffdc1..12edf9686 100644 --- a/src/osgDB/Input.cpp +++ b/src/osgDB/Input.cpp @@ -65,7 +65,10 @@ osg::Image* Input::readImage() osg::Drawable* Input::readDrawable() { - return Registry::instance()->getDeprecatedDotOsgObjectWrapperManager()->readDrawable(*this); + osg::Drawable* drawable = Registry::instance()->getDeprecatedDotOsgObjectWrapperManager()->readDrawable(*this); + osg::Geometry* geometry = drawable ? drawable->asGeometry() : 0; + if (geometry && geometry->containsDeprecatedData()) geometry->fixDeprecatedData(); + return drawable; } osg::StateAttribute* Input::readStateAttribute()