Sfoglia il codice sorgente

*** empty log message ***

David Rose 25 anni fa
parent
commit
e5fa7f674a
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      panda/src/egg2sg/characterMaker.cxx

+ 4 - 1
panda/src/egg2sg/characterMaker.cxx

@@ -30,7 +30,7 @@ CharacterMaker(EggGroup *root, EggLoader &loader)
   _character_node = new Character(_egg_root->get_name());
   _bundle = _character_node->get_bundle();
 
-  _morph_root = new PartGroup(_bundle, "morph");
+  _morph_root = (PartGroup *)NULL;
   _skeleton_root = new PartGroup(_bundle, "<skeleton>");
 }
 
@@ -113,6 +113,9 @@ part_to_node(PartGroup *part) const {
 ////////////////////////////////////////////////////////////////////
 int CharacterMaker::
 create_slider(const string &name) {
+  if (_morph_root == (PartGroup *)NULL) {
+    _morph_root = new PartGroup(_bundle, "morph");
+  }
   CharacterSlider *slider = new CharacterSlider(_morph_root, name);
   int index = _parts.size();
   _parts.push_back(slider);