فهرست منبع

Changed getAncestry to getAncestors

Gyedo Jeon 17 سال پیش
والد
کامیت
37df0df5c7

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

@@ -387,7 +387,7 @@ class DirectCameraControl(DirectObject):
             self.cqEntries = self.cqEntries[1:] + self.cqEntries[:1]
             # Filter out object's under camera
             nodePath = entry.getIntoNodePath()
-            if base.direct.camera not in nodePath.getAncestry():
+            if base.direct.camera not in nodePath.getAncestors():
                 # Compute new hit point
                 hitPt = entry.getSurfacePoint(entry.getFromNodePath())
                 # Move coa marker to new point

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

@@ -543,7 +543,7 @@ class SelectionQueue(CollisionHandlerQueue):
                 # Skip, if backfacing poly
                 pass
             elif ((skipFlags & SKIP_CAMERA) and
-                  (camera in nodePath.getAncestry())):
+                  (camera in nodePath.getAncestors())):
                 # Skip if parented to a camera.
                 pass
             # Can pick unpickable, use the first visible node

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

@@ -512,8 +512,7 @@ class DirectSession(DirectObject):
             messenger.send('DIRECT_preSelectNodePath', [dnp])
             if fResetAncestry:
                 # Update ancestry
-                self.ancestry = dnp.getAncestry()
-                self.ancestry.reverse()
+                self.ancestry = dnp.getAncestors()
                 self.ancestryIndex = 0
             # Update the selectedNPReadout
             self.selectedNPReadout.reparentTo(aspect2d)

+ 2 - 1
direct/src/extensions_native/NodePath_extensions.py

@@ -134,7 +134,8 @@ del lsNamesRecurse
 #####################################################################
 def reverseLsNames(self):
         """Walk up a tree and print out the path to the root"""
-        ancestry = self.getAncestry()
+        ancestors = list(self.getAncestors())
+        ancestry = ancestors.reverse()
         indentString = ""
         for nodePath in ancestry:
             type = nodePath.node().getType().getName()