Browse Source

Fixed? bounding box computation error

Mark Mine 23 years ago
parent
commit
24b2cc8203

+ 1 - 1
direct/src/directtools/DirectCameraControl.py

@@ -292,7 +292,7 @@ class DirectCameraControl(PandaObject):
             self.cqEntries = self.cqEntries[1:] + self.cqEntries[:1]
             self.cqEntries = self.cqEntries[1:] + self.cqEntries[:1]
             # Filter out object's under camera
             # Filter out object's under camera
             node = entry.getIntoNode()
             node = entry.getIntoNode()
-            nodePath = render.findPathDownTo(node)
+            nodePath = render.findPathTo(node)
             if direct.camera not in nodePath.getAncestry():
             if direct.camera not in nodePath.getAncestry():
                 # Compute hit point
                 # Compute hit point
                 # KEH: use current display region ray
                 # KEH: use current display region ray

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

@@ -235,7 +235,8 @@ class DirectBoundingBox:
         self.lines = self.createBBoxLines()
         self.lines = self.createBBoxLines()
 
 
     def computeBounds(self):
     def computeBounds(self):
-        self.bounds = self.nodePath.getBounds()
+        #self.bounds = self.nodePath.getBounds()
+        self.bounds = self.getBounds()
         if self.bounds.isEmpty() or self.bounds.isInfinite():
         if self.bounds.isEmpty() or self.bounds.isInfinite():
             self.center = Point3(0)
             self.center = Point3(0)
             self.radius = 1.0
             self.radius = 1.0