Browse Source

Added ability to use 'high', 'med', 'low' as lodNames

Josh Wilson 20 years ago
parent
commit
1c3250e7b9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      direct/src/actor/Actor.py

+ 2 - 2
direct/src/actor/Actor.py

@@ -321,7 +321,7 @@ class Actor(PandaObject, NodePath):
         self.__sortedLODNames = self.__partBundleDict.keys()
         # Reverse sort the doing a string->int
         def sortFunc(x,y):
-            if isinstance(x,str):
+            if not str(x).isdigit():
                 smap = {'h':2,
                         'm':1,
                         'l':0}
@@ -329,7 +329,7 @@ class Actor(PandaObject, NodePath):
             else:
                 return cmp (int(y),int(x))
                 
-        self.__sortedLODNames.sort(lambda x,y : cmp(int(y), int(x)))
+        self.__sortedLODNames.sort(sortFunc)
 
     def getLODNames(self):
         """