Browse Source

Fix crash. upcastToPandaNode is no longer needed

rdb 16 years ago
parent
commit
c1dd337f86
1 changed files with 2 additions and 8 deletions
  1. 2 8
      direct/src/directtools/DirectLights.py

+ 2 - 8
direct/src/directtools/DirectLights.py

@@ -8,15 +8,9 @@ class DirectLight(NodePath):
         NodePath.__init__(self)
         NodePath.__init__(self)
         # 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()