mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -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
|
# add the switch distance info
|
||||||
## sortedKeys = self.switches.keys()
|
## sortedKeys = self.switches.keys()
|
||||||
## sortedKeys.sort()
|
## sortedKeys.sort()
|
||||||
sortedKeys = self.__sortedLODNames
|
self.__LODNode.node().setSwitch(self.getLODIndex(lodName), inDist, outDist)
|
||||||
index = sortedKeys.index(str(lodName))
|
|
||||||
self.__LODNode.node().setSwitch(index, 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):
|
def getLOD(self, lodName):
|
||||||
"""getLOD(self, string)
|
"""getLOD(self, string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user