]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/SGReaderWriterXML.cxx
Add writeLocalData functions for internal scenegraph classes
[simgear.git] / simgear / scene / model / SGReaderWriterXML.cxx
index e9020407644134af8bf9e0ade487edc93da33e08..31c0c56dddaf42ad27e0589a78851e9a30cc2539 100644 (file)
@@ -41,6 +41,7 @@
 #include "animation.hxx"
 #include "particles.hxx"
 #include "model.hxx"
+#include "SGText.hxx"
 
 using namespace simgear;
 
@@ -305,6 +306,14 @@ sgLoad3DModel_internal(const string &path,
                         options.get()));
     }
 
+    std::vector<SGPropertyNode_ptr> text_nodes;
+    text_nodes = props->getChildren("text");
+    for (unsigned i = 0; i < text_nodes.size(); ++i) {
+        group->addChild(SGText::appendText(text_nodes[i],
+                        prop_root,
+                        options.get()));
+    }
+
     std::vector<SGPropertyNode_ptr> animation_nodes;
     animation_nodes = props->getChildren("animation");
     for (unsigned i = 0; i < animation_nodes.size(); ++i)