From 8c0413e29307a0311b8220ac631ccf9b74cf4268 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 8 Apr 2014 11:17:55 +0000 Subject: [PATCH] From Pjotr Svetachov, "We had a small problem converting skeleton animations from fbx to osgt format. Turned out that the serializer didn't handle bone names with spaces very well (the 3ds studio max biped for instance has spaces by default). Here is a small fix for the problem." --- src/osgWrappers/serializers/osgAnimation/Animation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osgWrappers/serializers/osgAnimation/Animation.cpp b/src/osgWrappers/serializers/osgAnimation/Animation.cpp index 028cae635..f844b36c4 100644 --- a/src/osgWrappers/serializers/osgAnimation/Animation.cpp +++ b/src/osgWrappers/serializers/osgAnimation/Animation.cpp @@ -8,8 +8,8 @@ static void readChannel( osgDB::InputStream& is, osgAnimation::Channel* ch ) { std::string name, targetName; - is >> is.PROPERTY("Name") >> name; - is >> is.PROPERTY("TargetName") >> targetName; + is >> is.PROPERTY("Name"); is.readWrappedString(name); + is >> is.PROPERTY("TargetName"); is.readWrappedString(targetName); ch->setName( name ); ch->setTargetName( targetName ); } @@ -80,8 +80,8 @@ static void readContainer2( osgDB::InputStream& is, ContainerType* container ) static void writeChannel( osgDB::OutputStream& os, osgAnimation::Channel* ch ) { - os << os.PROPERTY("Name") << ch->getName() << std::endl; - os << os.PROPERTY("TargetName") << ch->getTargetName() << std::endl; + os << os.PROPERTY("Name"); os.writeWrappedString(ch->getName()); os << std::endl; + os << os.PROPERTY("TargetName");os.writeWrappedString(ch->getTargetName()); os << std::endl; } template