Browse Source

fix egg-emulate-bface to work properly with animated vertices

David Rose 19 years ago
parent
commit
6f319873d3
1 changed files with 4 additions and 1 deletions
  1. 4 1
      panda/src/egg2pg/eggLoader.cxx

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

@@ -1556,7 +1556,10 @@ emulate_bface(EggNode *egg_node) {
               EggVertex dup_vertex(*vertex);
               dup_vertex.set_normal(-dup_vertex.get_normal());
               EggVertex *new_vertex = vertex->get_pool()->create_unique_vertex(dup_vertex);
-              dup_poly->replace(vi, new_vertex);
+              if (new_vertex != vertex) {
+                new_vertex->copy_grefs_from(*vertex);
+                dup_poly->replace(vi, new_vertex);
+              }
             }
           }
           dup_prims->add_child(dup_poly);