mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
Fix crash. upcastToPandaNode is no longer needed
This commit is contained in:
parent
9c1244dd92
commit
c1dd337f86
@ -9,14 +9,8 @@ class DirectLight(NodePath):
|
|||||||
# Record light and name
|
# Record light and name
|
||||||
self.light = light
|
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
|
# Attach node to self
|
||||||
self.assign(parent.attachNewNode(node))
|
self.assign(parent.attachNewNode(self.light))
|
||||||
|
|
||||||
def getName(self):
|
def getName(self):
|
||||||
return self.light.getName()
|
return self.light.getName()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user