Browse Source

minor adjustments

David Rose 24 years ago
parent
commit
f24e3a090f

+ 2 - 2
direct/src/directtools/DirectSelection.py

@@ -489,7 +489,7 @@ class SelectionRay:
         # Determine ray direction based upon the mouse coordinates
         # Determine ray direction based upon the mouse coordinates
         # Note! This has to be a cam object (of type LensNode)
         # Note! This has to be a cam object (of type LensNode)
         self.ray.setFromLens( base.camNode, mouseX, mouseY )
         self.ray.setFromLens( base.camNode, mouseX, mouseY )
-        self.ct.traverse( targetNodePath.node() )
+        self.ct.traverse( targetNodePath )
         self.numEntries = self.cq.getNumEntries()
         self.numEntries = self.cq.getNumEntries()
         self.cq.sortEntries()
         self.cq.sortEntries()
         # Record cam's current position (used for cycling through
         # Record cam's current position (used for cycling through
@@ -554,7 +554,7 @@ class SelectionRay:
         # Note! This has to be a cam object (of type ProjectionNode)
         # Note! This has to be a cam object (of type ProjectionNode)
         self.ray.setOrigin( origin )
         self.ray.setOrigin( origin )
         self.ray.setDirection( dir )
         self.ray.setDirection( dir )
-        self.ct.traverse( targetNodePath.node() )
+        self.ct.traverse( targetNodePath )
         self.numEntries = self.cq.getNumEntries()
         self.numEntries = self.cq.getNumEntries()
         self.cq.sortEntries()
         self.cq.sortEntries()
         return self.numEntries
         return self.numEntries

+ 8 - 2
direct/src/tkpanels/DirectSessionPanel.py

@@ -904,8 +904,14 @@ class DirectSessionPanel(AppShell):
 
 
     def updateLightInfo(self, page = None):
     def updateLightInfo(self, page = None):
         # Set main lighting button
         # Set main lighting button
-        self.enableLights.set(
-            render.arc().hasTransition(LightTransition.getClassType()))
+        try:
+            # Old scene graph interface
+            self.enableLights.set(
+                render.arc().hasTransition(LightTransition.getClassType()))
+        except:
+            # No new scene graph equivalent yet
+            self.enableLights.set(0)
+            
         # Set light specific info
         # Set light specific info
         if self.activeLight:
         if self.activeLight:
             l = self.activeLight.getLight()
             l = self.activeLight.getLight()