mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Method for toggling visiblity draw mode
This commit is contained in:
parent
e5c464101c
commit
2bd054fc9c
@ -51,6 +51,7 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
||||
align = TextNode.ARight,
|
||||
)
|
||||
self.zonesEnteredList = []
|
||||
self.fColorZones = 0
|
||||
|
||||
def generate(self):
|
||||
DistributedLevel.notify.debug('generate')
|
||||
@ -326,10 +327,20 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
||||
self.parent2ChildIds[parentId].append(entId)
|
||||
|
||||
def showZone(self, zoneNum):
|
||||
self.zoneNum2node[zoneNum].show()
|
||||
zone = self.zoneNum2node[zoneNum]
|
||||
zone.show()
|
||||
zone.clearColor()
|
||||
|
||||
def toggleColorZones(self):
|
||||
self.fColorZones = 1 - self.fColorZones
|
||||
|
||||
def hideZone(self, zoneNum):
|
||||
self.zoneNum2node[zoneNum].hide()
|
||||
zone = self.zoneNum2node[zoneNum]
|
||||
if self.fColorZones:
|
||||
zone.show()
|
||||
zone.setColor(1,0,0)
|
||||
else:
|
||||
zone.hide()
|
||||
|
||||
def setTransparency(self, alpha, zone=None):
|
||||
self.geom.setTransparency(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user