Browse Source

minor refinement

David Rose 17 years ago
parent
commit
a831fc8ca6
1 changed files with 6 additions and 9 deletions
  1. 6 9
      direct/src/actor/Actor.py

+ 6 - 9
direct/src/actor/Actor.py

@@ -1089,8 +1089,12 @@ class Actor(DirectObject, NodePath):
         joints=[]
         joints=[]
         pattern = GlobPattern(jointName)
         pattern = GlobPattern(jointName)
 
 
+        if lodName == None and self.mergeLODBundles:
+            # Get any LOD.
+            lodName = self.__partBundleDict.keys()[0]
+
         if lodName == None:
         if lodName == None:
-            # Get all LOD's
+            # Get all LOD's.
             partBundleDicts = self.__partBundleDict.values()
             partBundleDicts = self.__partBundleDict.values()
         else:
         else:
             # Get one LOD.
             # Get one LOD.
@@ -1157,7 +1161,7 @@ class Actor(DirectObject, NodePath):
             elif subset.matchesExclude(name):
             elif subset.matchesExclude(name):
                 isIncluded = False
                 isIncluded = False
 
 
-        if isIncluded and pattern.matches(name):
+        if isIncluded and pattern.matches(name) and isinstance(partNode, MovingPartBase):
             joints.append(partNode)
             joints.append(partNode)
 
 
         for child in partNode.getChildren():
         for child in partNode.getChildren():
@@ -2027,13 +2031,6 @@ class Actor(DirectObject, NodePath):
 
 
             allJoints = set(self.getJoints(partName = partName, lodName = lodName))
             allJoints = set(self.getJoints(partName = partName, lodName = lodName))
             diff = allJoints.difference(subJoints)
             diff = allJoints.difference(subJoints)
-            for joint in list(diff):
-                if joint.getName() == '<skeleton>' or joint.getName() == 'morph' or isinstance(joint, PartBundle):
-                    # We'll allow these special-case joints, which are
-                    # usually unanimated root nodes, to remain
-                    # uncovered without complaining.
-                    diff.remove(joint)
-                    
             if diff:
             if diff:
                 self.notify.warning('Uncovered joints: %s' % (list(diff)))
                 self.notify.warning('Uncovered joints: %s' % (list(diff)))