diff --git a/src/osgWrappers/serializers/osgSim/MultiSwitch.cpp b/src/osgWrappers/serializers/osgSim/MultiSwitch.cpp index 14d3c64a8..592aea7ab 100644 --- a/src/osgWrappers/serializers/osgSim/MultiSwitch.cpp +++ b/src/osgWrappers/serializers/osgSim/MultiSwitch.cpp @@ -49,6 +49,36 @@ static bool writeValues( osgDB::OutputStream& os, const osgSim::MultiSwitch& nod return true; } +static bool checkValueNames(const osgSim::MultiSwitch& node) +{ + return node.getSwitchSetList().size()>0; +} + +static bool readValueNames(osgDB::InputStream& is, osgSim::MultiSwitch& node) +{ + unsigned int size = is.readSize(); is >> is.BEGIN_BRACKET; + for (unsigned int i = 0; i> name; + node.setValueName(i, name); + } + is >> is.END_BRACKET; + return true; +} + +static bool writeValueNames(osgDB::OutputStream& os, const osgSim::MultiSwitch& node) +{ + const osgSim::MultiSwitch::SwitchSetList& switches = node.getSwitchSetList(); + os.writeSize(switches.size()); os << os.BEGIN_BRACKET << std::endl; + for (unsigned int i = 0; i