mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix for actor setLOD
This commit is contained in:
parent
ffd836e3b1
commit
3fcd2a764e
@ -700,9 +700,13 @@ class Actor(DirectObject, NodePath):
|
||||
# add the switch distance info
|
||||
## sortedKeys = self.switches.keys()
|
||||
## sortedKeys.sort()
|
||||
sortedKeys = self.__sortedLODNames
|
||||
index = sortedKeys.index(str(lodName))
|
||||
self.__LODNode.node().setSwitch(index, inDist, outDist)
|
||||
self.__LODNode.node().setSwitch(self.getLODIndex(lodName), inDist, outDist)
|
||||
|
||||
def getLODIndex(self, lodName):
|
||||
"""getLODIndex(self)
|
||||
safe method (but expensive) for retrieving the child index
|
||||
"""
|
||||
return list(self.__LODNode.getChildren()).index(self.getLOD(lodName))
|
||||
|
||||
def getLOD(self, lodName):
|
||||
"""getLOD(self, string)
|
||||
|
Loading…
x
Reference in New Issue
Block a user