Skip to content

Commit

Permalink
Merge pull request #76 from reportingsjr/master
Browse files Browse the repository at this point in the history
Change name prefix in the VRML/OpenInventor exporter
  • Loading branch information
wwmayer committed Jan 13, 2016
2 parents e0ee8bb + f46a696 commit bf151fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Gui/SoFCDB.cpp
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bf151fe

Please sign in to comment.