Change name prefix in the VRML exporter to one that is allowed in the standards.

This commit is contained in:
Jon Neal 2016-01-04 01:03:18 -05:00
parent 1747fb643f
commit f46a6965d2

View File

@ -26,6 +26,7 @@
# include <Inventor/actions/SoToVRML2Action.h>
# include <Inventor/VRMLnodes/SoVRMLGroup.h>
# include <Inventor/VRMLnodes/SoVRMLParent.h>
# include <Inventor/SbString.h>
#endif
#include <Base/FileInfo.h>
@ -217,6 +218,7 @@ bool Gui::SoFCDB::writeToVRML(SoNode* node, const char* filename, bool binary)
SoToVRML2Action tovrml2;
tovrml2.apply(node);
SoVRMLGroup* vrmlRoot = tovrml2.getVRML2SceneGraph();
vrmlRoot->setInstancePrefix(SbString("o"));
vrmlRoot->ref();
std::string buffer = SoFCDB::writeNodesToString(vrmlRoot);
vrmlRoot->unref(); // release the memory as soon as possible