Browse Source

Fix regression loading nurbs surface/curve and patches from .egg

rdb 9 years ago
parent
commit
89deb71538
1 changed files with 10 additions and 10 deletions
  1. 10 10
      panda/src/egg2pg/eggBinner.cxx

+ 10 - 10
panda/src/egg2pg/eggBinner.cxx

@@ -50,16 +50,7 @@ prepare_node(EggNode *node) {
  */
  */
 int EggBinner::
 int EggBinner::
 get_bin_number(const EggNode *node) {
 get_bin_number(const EggNode *node) {
-  if (node->is_of_type(EggPrimitive::get_class_type())) {
-    return (int)BN_polyset;
-
-  } else if (node->is_of_type(EggGroup::get_class_type())) {
-    const EggGroup *group = DCAST(EggGroup, node);
-    if (group->has_lod()) {
-      return (int)BN_lod;
-    }
-
-  } else if (node->is_of_type(EggNurbsSurface::get_class_type())) {
+  if (node->is_of_type(EggNurbsSurface::get_class_type())) {
     return (int)BN_nurbs_surface;
     return (int)BN_nurbs_surface;
 
 
   } else if (node->is_of_type(EggNurbsCurve::get_class_type())) {
   } else if (node->is_of_type(EggNurbsCurve::get_class_type())) {
@@ -67,6 +58,15 @@ get_bin_number(const EggNode *node) {
 
 
   } else if (node->is_of_type(EggPatch::get_class_type())) {
   } else if (node->is_of_type(EggPatch::get_class_type())) {
     return (int)BN_patches;
     return (int)BN_patches;
+
+  } else if (node->is_of_type(EggPrimitive::get_class_type())) {
+    return (int)BN_polyset;
+
+  } else if (node->is_of_type(EggGroup::get_class_type())) {
+    const EggGroup *group = DCAST(EggGroup, node);
+    if (group->has_lod()) {
+      return (int)BN_lod;
+    }
   }
   }
 
 
   return (int)BN_none;
   return (int)BN_none;