mirror of
https://github.com/panda3d/panda3d.git
synced 2026-04-21 05:59:27 -05:00
Changed getAncestry to getAncestors
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user