Tweaked MultiSwitch IO

This commit is contained in:
Robert Osfield
2003-11-25 16:07:32 +00:00
parent 72ba462251
commit 953bbd85e8
2 changed files with 13 additions and 1 deletions

View File

@@ -52,6 +52,16 @@ bool MultiSwitch_readLocalData(Object& obj, Input& fr)
}
}
if (fr.matchSequence("ActiveSwitchSet %i"))
{
unsigned int switchSet;
fr[1].getUInt(switchSet);
fr+=2;
sw.setActiveSwitchSet(switchSet);
}
if (fr.matchSequence("ValueList %i {"))
{
int entry = fr[0].getNoNestedBrackets();
@@ -91,6 +101,8 @@ bool MultiSwitch_writeLocalData(const Object& obj, Output& fw)
fw.indent()<<"NewChildDefaultValue "<<sw.getNewChildDefaultValue()<<std::endl;
fw.indent()<<"ActiveSwitchSet "<<sw.getActiveSwitchSet()<<std::endl;
unsigned int pos = 0;
const osgSim::MultiSwitch::SwitchSetList& switchset = sw.getSwitchSetList();
for(osgSim::MultiSwitch::SwitchSetList::const_iterator sitr=switchset.begin();