Summer 2010 CMU ETC PandaLE team: added two functions addDisplayRegionContext and removeDisplayRegionContext to add and remove display regions on the fly
This commit is contained in:
parent
89173e6d05
commit
2fefa6a0b8
|
|
@ -1300,6 +1300,15 @@ class DisplayRegionList(DirectObject):
|
|||
self.mouseUpdate()
|
||||
# hack to test movement
|
||||
return Task.cont
|
||||
|
||||
def addDisplayRegionContext(self, cam):
|
||||
self.displayRegionList.append(DisplayRegionContext(cam))
|
||||
|
||||
def removeDisplayRegionContext(self, cam):
|
||||
for drc in self.displayRegionList:
|
||||
if drc.cam == cam:
|
||||
self.displayRegionList.remove(drc)
|
||||
break
|
||||
|
||||
# Create one
|
||||
__builtins__['direct'] = base.direct = DirectSession()
|
||||
|
|
|
|||
Loading…
Reference in New Issue