mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
removed old code
This commit is contained in:
parent
fb3aab9e9d
commit
84e96f247f
@ -175,49 +175,6 @@ class DoCollectionManager:
|
|||||||
zoneDoSet = parentZoneDict.setdefault(zoneId, set())
|
zoneDoSet = parentZoneDict.setdefault(zoneId, set())
|
||||||
zoneDoSet.add(doId)
|
zoneDoSet.add(doId)
|
||||||
|
|
||||||
## if oldParentId == parentId:
|
|
||||||
## # Case 1: Same parent, new zone
|
|
||||||
## parentZoneDict = self.__doHierarchy.setdefault(parentId, {})
|
|
||||||
## # Remove this doId from the old zone list
|
|
||||||
## zoneDoSet = parentZoneDict.setdefault(oldZoneId, set())
|
|
||||||
## if doId in zoneDoSet:
|
|
||||||
## zoneDoSet.remove(doId)
|
|
||||||
## # Add it to the new zone list
|
|
||||||
## zoneDoSet = parentZoneDict.setdefault(zoneId, {})
|
|
||||||
## zoneDoSet[doId] = None
|
|
||||||
## ## if zoneDoSet is None:
|
|
||||||
## ## # No existing objList for this zone, let's make a new one
|
|
||||||
## ## parentZoneDict[zoneId] = [doId]
|
|
||||||
## ## else:
|
|
||||||
## ## # Just add this doId to the existing list
|
|
||||||
## ## assert(doId not in objList)
|
|
||||||
## ## zoneDoSet.append(doId)
|
|
||||||
## else:
|
|
||||||
## # Case 2: New parent, valid old parent
|
|
||||||
## if (oldParentId is not None) and (oldZoneId is not None):
|
|
||||||
## # First delete the old location
|
|
||||||
## self.deleteObjectLocation(doId, oldParentId, oldZoneId)
|
|
||||||
## # Case 2: continued, already deleted from old location
|
|
||||||
## # Case 3: New parent - no old parent
|
|
||||||
## parentZoneDict = self.__doHierarchy.setdefault(parentId, {})
|
|
||||||
## zoneDoSet = parentZoneDict.setdefault(zoneId, {})
|
|
||||||
## zoneDoSet[doId] = None
|
|
||||||
## ## if parentZoneDict is None:
|
|
||||||
## ## # This parent is not here, just fill the whole entry in
|
|
||||||
## ## self.__doHierarchy[parentId] = {zoneId : {doId: None}}
|
|
||||||
## ## else:
|
|
||||||
## ## zoneDoSet = parentZoneDict.setdefault(zoneId, {})
|
|
||||||
## ## zoneDoSet[doId] = None
|
|
||||||
## ## objList = parentZoneDict.get(zoneId)
|
|
||||||
## ## if objList is None:
|
|
||||||
## ## # This parent has no objects in this zone before
|
|
||||||
## ## # create a new entry for this zone and list this doId
|
|
||||||
## ## parentZoneDict[zoneId] = {doId: None}
|
|
||||||
## ## else:
|
|
||||||
## ## assert doId not in objList
|
|
||||||
## ## # Just add this doId to the existing list
|
|
||||||
## ## objList[doId] = None
|
|
||||||
|
|
||||||
def deleteObjectLocation(self, objId, parentId, zoneId):
|
def deleteObjectLocation(self, objId, parentId, zoneId):
|
||||||
# Do not worry about null values
|
# Do not worry about null values
|
||||||
if ((parentId is None) or (zoneId is None)):
|
if ((parentId is None) or (zoneId is None)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user