diff --git a/direct/src/directtools/DirectCameraControl.py b/direct/src/directtools/DirectCameraControl.py index 55b2835604..670eef6ad1 100644 --- a/direct/src/directtools/DirectCameraControl.py +++ b/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 diff --git a/direct/src/directtools/DirectSelection.py b/direct/src/directtools/DirectSelection.py index f504cdbebf..0769431d20 100644 --- a/direct/src/directtools/DirectSelection.py +++ b/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 diff --git a/direct/src/directtools/DirectSession.py b/direct/src/directtools/DirectSession.py index 6e30af839d..2138c837d2 100644 --- a/direct/src/directtools/DirectSession.py +++ b/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) diff --git a/direct/src/extensions_native/NodePath_extensions.py b/direct/src/extensions_native/NodePath_extensions.py index ae6485cd99..5cb274c92e 100644 --- a/direct/src/extensions_native/NodePath_extensions.py +++ b/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()