Moved the set/getName() support from osg::Node etc into the osg::Obejct

base class
This commit is contained in:
Robert Osfield
2005-06-08 13:16:19 +00:00
parent 69cd27e37f
commit 27c4c6a956
19 changed files with 135 additions and 122 deletions

View File

@@ -43,6 +43,13 @@ bool Object_readLocalData(Object& obj, Input& fr)
}
}
if (fr.matchSequence("name %s"))
{
obj.setName(fr[1].getStr());
fr+=2;
iteratorAdvanced = true;
}
if (fr.matchSequence("UserData {"))
{
osg::notify(osg::DEBUG_INFO) << "Matched UserData {"<< std::endl;
@@ -71,6 +78,8 @@ bool Object_writeLocalData(const Object& obj, Output& fw)
default: fw.indent() << "DataVariance DYNAMIC" << std::endl;break;
}
if (!obj.getName().empty()) fw.indent() << "name "<<fw.wrapString(obj.getName())<< std::endl;
if (obj.getUserData())
{
const Object* object = dynamic_cast<const Object*>(obj.getUserData());