From c1dd337f86452a614aa3d058e283edaef9cf2ef3 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 2 Apr 2009 13:29:52 +0000 Subject: [PATCH] Fix crash. upcastToPandaNode is no longer needed --- direct/src/directtools/DirectLights.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/direct/src/directtools/DirectLights.py b/direct/src/directtools/DirectLights.py index ef2aec84a7..4a493d779d 100644 --- a/direct/src/directtools/DirectLights.py +++ b/direct/src/directtools/DirectLights.py @@ -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()