Fix crash. upcastToPandaNode is no longer needed

This commit is contained in:
rdb 2009-04-02 13:29:52 +00:00
parent 9c1244dd92
commit c1dd337f86

View File

@ -8,15 +8,9 @@ class DirectLight(NodePath):
NodePath.__init__(self)
# Record light and name
self.light = light
# Upcast the light object to its node base pointer
if isinstance(light, Spotlight):
node = light.upcastToLensNode()
else:
node = light.upcastToPandaNode()
# Attach node to self
self.assign(parent.attachNewNode(node))
self.assign(parent.attachNewNode(self.light))
def getName(self):
return self.light.getName()