From f24e3a090f61f28c822657e3385364ba3b2f5650 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 18 Mar 2002 17:20:33 +0000 Subject: [PATCH] minor adjustments --- direct/src/directtools/DirectSelection.py | 4 ++-- direct/src/tkpanels/DirectSessionPanel.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/direct/src/directtools/DirectSelection.py b/direct/src/directtools/DirectSelection.py index 2b4c9b279c..d91fd3c677 100644 --- a/direct/src/directtools/DirectSelection.py +++ b/direct/src/directtools/DirectSelection.py @@ -489,7 +489,7 @@ class SelectionRay: # Determine ray direction based upon the mouse coordinates # Note! This has to be a cam object (of type LensNode) self.ray.setFromLens( base.camNode, mouseX, mouseY ) - self.ct.traverse( targetNodePath.node() ) + self.ct.traverse( targetNodePath ) self.numEntries = self.cq.getNumEntries() self.cq.sortEntries() # 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) self.ray.setOrigin( origin ) self.ray.setDirection( dir ) - self.ct.traverse( targetNodePath.node() ) + self.ct.traverse( targetNodePath ) self.numEntries = self.cq.getNumEntries() self.cq.sortEntries() return self.numEntries diff --git a/direct/src/tkpanels/DirectSessionPanel.py b/direct/src/tkpanels/DirectSessionPanel.py index f5b19625e7..2cd9860081 100644 --- a/direct/src/tkpanels/DirectSessionPanel.py +++ b/direct/src/tkpanels/DirectSessionPanel.py @@ -904,8 +904,14 @@ class DirectSessionPanel(AppShell): def updateLightInfo(self, page = None): # 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 if self.activeLight: l = self.activeLight.getLight()