Changed getAncestry to getAncestors

This commit is contained in:
Gyedo Jeon
2008-11-15 01:00:52 +00:00
parent 68c236069f
commit 37df0df5c7
4 changed files with 5 additions and 5 deletions
@@ -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
View File
@@ -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
View File
@@ -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()