Просмотр исходного кода

fixes cubes animation with joint-scale named nodes

Asad M. Zaman 22 лет назад
Родитель
Сommit
835edb8b4a
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      pandatool/src/softegg/softNodeDesc.cxx

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

@@ -365,9 +365,12 @@ set_parentJoint(SAA_Scene *scene, SoftNodeDesc *lastJoint) {
     lastJoint = this;
   }
   if ( _parentJoint && strstr( _parentJoint->get_name().c_str(), "scale" ) != NULL ) {
-    _parentJoint = NULL;
-    //    _parentJoint = lastJoint = NULL;
-    softegg_cat.spam() << "scale joint flag set!\n";
+    // make sure _parentJoint didn't have the name "joint" in it
+    if (strstr(_parentJoint->get_name().c_str(), "joint") == NULL) {
+      _parentJoint = NULL;
+      //    _parentJoint = lastJoint = NULL;
+      softegg_cat.spam() << "scale joint flag set!\n";
+    }
   }
 
   // look in the children