Moved the set/getName() support from osg::Node etc into the osg::Obejct
base class
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user