From 229a0f29201ee0485c9cb49639149abbd59c1701 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 25 Aug 2003 22:50:01 +0000 Subject: [PATCH] Added check for :: in wrapper name when writing out to .osg, so that if a namaspace:: exists in the wrapper name then one isn't created for it by default. --- src/osgDB/Registry.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp index 00909489c..01b7b797b 100644 --- a/src/osgDB/Registry.cpp +++ b/src/osgDB/Registry.cpp @@ -1002,7 +1002,16 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw) else { // member of the node kit so must use composite library::class name. - fw.indent() << obj.libraryName()<<"::"<< wrapper->getName() << " {"<< std::endl; + std::string::size_type posDoubleColon = wrapper->getName().find("::"); + if (posDoubleColon != std::string::npos) + { + fw.indent() << wrapper->getName() << " {"<< std::endl; + } + else + { + fw.indent() << obj.libraryName()<<"::"<< wrapper->getName() << " {"<< std::endl; + } + fw.moveIn(); }