Browse Source

Avoid creating an unnecessary intermediate node when loading .egg models (see forum thread 16039)

rdb 12 years ago
parent
commit
6bb87ca9c5
1 changed files with 5 additions and 1 deletions
  1. 5 1
      panda/src/egg2pg/eggLoader.cxx

+ 5 - 1
panda/src/egg2pg/eggLoader.cxx

@@ -213,7 +213,11 @@ build_graph() {
 
   // Now build up the scene graph.
   _root = new ModelRoot(_data->get_egg_filename(), _data->get_egg_timestamp());
-  make_node(_data, _root);
+
+  EggGroupNode::const_iterator ci;
+  for (ci = _data->begin(); ci != _data->end(); ++ci) {
+    make_node(*ci, _root);
+  }
 
   reparent_decals();
   start_sequences();