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

This commit is contained in:
Josh Wilson 2005-12-08 23:42:19 +00:00
parent b76a4acac3
commit 1c3250e7b9
1 changed files with 2 additions and 2 deletions

View File

@ -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):
"""