2
0
Эх сурвалжийг харах

fixed a bug where DCAST_INTO_R was returning from make_soft_skin incomplete if an assertion was happening.

Asad M. Zaman 22 жил өмнө
parent
commit
973d3d81cc

+ 10 - 0
pandatool/src/softegg/softNodeTree.cxx

@@ -203,18 +203,28 @@ build_complete_hierarchy(SAA_Scene &scene, SAA_Database &database) {
     }
     }
   }
   }
 
 
+  softegg_cat.spam() << "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj\n";
+
   // check the nodes that are junk for animation/artist control purposes
   // check the nodes that are junk for animation/artist control purposes
   _root->check_junk(false);
   _root->check_junk(false);
 
 
+  softegg_cat.spam() << "jpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjpjp\n";
+
   // check the nodes that are parent of ancestors of a joint
   // check the nodes that are parent of ancestors of a joint
   _root->check_joint_parent();
   _root->check_joint_parent();
 
 
+  softegg_cat.spam() << "pppppppppppppppppppppppppppppppppppppppppppppppppppppppp\n";
+
   // check the nodes that are pseudo joints
   // check the nodes that are pseudo joints
   _root->check_pseudo_joints(false);
   _root->check_pseudo_joints(false);
 
 
+  softegg_cat.spam() << "========================================================\n";
+
   // find _parentJoint for each node
   // find _parentJoint for each node
   _root->set_parentJoint(&scene, NULL);
   _root->set_parentJoint(&scene, NULL);
 
 
+  softegg_cat.spam() << "========================================================\n";
+
   return all_ok;
   return all_ok;
 }
 }
 #if 0
 #if 0

+ 6 - 3
pandatool/src/softegg/softToEggConverter.cxx

@@ -1609,6 +1609,7 @@ make_soft_skin() {
     node_desc = _tree.get_node(i);
     node_desc = _tree.get_node(i);
     SAA_modelIsSkeleton( &scene, node_desc->get_model(), &isSkeleton );
     SAA_modelIsSkeleton( &scene, node_desc->get_model(), &isSkeleton );
 
 
+    softegg_cat.spam() << "??checking node " << node_desc->get_name() << " isSkel " << isSkeleton << " isJoint " << node_desc->is_joint() << endl;
     if (isSkeleton && node_desc->is_joint()) {
     if (isSkeleton && node_desc->is_joint()) {
 
 
       if (node_desc->is_partial(search_prefix))
       if (node_desc->is_partial(search_prefix))
@@ -1804,7 +1805,9 @@ make_soft_skin() {
                 exit(1);
                 exit(1);
               }
               }
               string vpool_name = s_name + ".verts";
               string vpool_name = s_name + ".verts";
-              DCAST_INTO_R(vpool, _tree.get_egg_root()->find_child(vpool_name), NULL);
+              EggNode *t = _tree.get_egg_root()->find_child(vpool_name);
+              if (t)
+                DCAST_INTO_R(vpool, t, NULL);
 
 
               // find the mapping of the vertices that match this envelop
               // find the mapping of the vertices that match this envelop
               if (vpool) {
               if (vpool) {
@@ -1814,8 +1817,8 @@ make_soft_skin() {
                 }
                 }
               }
               }
               else {
               else {
-                softegg_cat.debug() << "error: vpool " << vpool_name << " not found\n";
-                exit(1);
+                softegg_cat.debug() << "warning: vpool " << vpool_name << " not found\n";
+                continue; // could be because of not visible
               }
               }
 
 
               joint = node_desc->get_egg_group();
               joint = node_desc->get_egg_group();