*** empty log message ***

This commit is contained in:
Joe Shochet 2001-05-09 16:24:50 +00:00
parent b0de14c08b
commit 71c4eb30b7

View File

@ -613,6 +613,7 @@ class LevelEditor(NodePath, PandaObject):
# The selected DNA Object/NodePath # The selected DNA Object/NodePath
self.selectedDNARoot = None self.selectedDNARoot = None
self.selectedNPRoot = None self.selectedNPRoot = None
self.selectedSuitPoint = None
self.lastLandmarkBuildingDNA = None self.lastLandmarkBuildingDNA = None
self.showLandmarkBlockToggleGroup = None self.showLandmarkBlockToggleGroup = None
# Set active target (the subcomponent being modified) # Set active target (the subcomponent being modified)
@ -1827,6 +1828,7 @@ class LevelEditor(NodePath, PandaObject):
# Clear out old root variables # Clear out old root variables
self.selectedDNARoot = None self.selectedDNARoot = None
self.selectedNPRoot = None self.selectedNPRoot = None
self.selectedSuitPoint = None
# Now process newly selected node path # Now process newly selected node path
dnaParent = None dnaParent = None
dnaNode = self.findDNANode(nodePath) dnaNode = self.findDNANode(nodePath)
@ -1865,6 +1867,7 @@ class LevelEditor(NodePath, PandaObject):
pointOrCell, type = self.findPointOrCell(nodePath) pointOrCell, type = self.findPointOrCell(nodePath)
if pointOrCell and (type == 'suitPointMarker'): if pointOrCell and (type == 'suitPointMarker'):
print "Found suit point!", pointOrCell print "Found suit point!", pointOrCell
self.selectedSuitPoint = pointOrCell
if pointOrCell and (type == 'battleCellMarker'): if pointOrCell and (type == 'battleCellMarker'):
print "Found battle cell!", pointOrCell print "Found battle cell!", pointOrCell
@ -1876,6 +1879,7 @@ class LevelEditor(NodePath, PandaObject):
# Clear out old root variables # Clear out old root variables
self.selectedDNARoot = None self.selectedDNARoot = None
self.selectedNPRoot = None self.selectedNPRoot = None
self.selectedSuitPoint = None
# Let others know: # Let others know:
for i in self.deselectedNodePathHookHooks: for i in self.deselectedNodePathHookHooks:
i() i()
@ -2634,7 +2638,7 @@ class LevelEditor(NodePath, PandaObject):
marker.setPos(pos) marker.setPos(pos)
if (type == DNASuitPoint.STREETPOINT): if (type == DNASuitPoint.STREETPOINT):
marker.setColor(0,0,0.6) marker.setColor(0,0,0.6)
marker.setScale(0.25) marker.setScale(0.4)
elif (type == DNASuitPoint.FRONTDOORPOINT): elif (type == DNASuitPoint.FRONTDOORPOINT):
marker.setColor(0,0,1) marker.setColor(0,0,1)
marker.setScale(0.5) marker.setScale(0.5)
@ -2930,6 +2934,11 @@ class LevelEditor(NodePath, PandaObject):
np=self.selectedNPRoot np=self.selectedNPRoot
self.showLandmarkBlockToggleGroup.append(np) self.showLandmarkBlockToggleGroup.append(np)
np.setColor(1,0,0,1) np.setColor(1,0,0,1)
elif self.selectedSuitPoint and self.lastLandmarkBuildingDNA:
block=self.lastLandmarkBuildingDNA.getName()
block=block[2:block.find(':')]
print ("associate point with building: " + str(block))
self.selectedSuitPoint.setLandmarkBuildingIndex(int(block))
def findHighestLandmarkBlock(self, dnaRoot, npRoot): def findHighestLandmarkBlock(self, dnaRoot, npRoot):
npc=npRoot.findAllMatches("**/*:toon_landmark_*") npc=npRoot.findAllMatches("**/*:toon_landmark_*")
@ -3025,10 +3034,26 @@ class LevelEditor(NodePath, PandaObject):
group.append(nodePath) group.append(nodePath)
nodePath.setColor(0,1,0,1) nodePath.setColor(0,1,0,1)
# Get the suit point for this lb
for point, marker in self.pointDict.items():
if (point.getPointType() == DNASuitPoint.FRONTDOORPOINT):
lbIndex = point.getLandmarkBuildingIndex()
if (lbIndex == int(block)):
marker.setColor(1,0,0,1)
marker.setScale(1.0)
# There should only be one, so break now
elif (lbIndex == -1):
# This point belongs to no block
marker.setColor(0,1,0,1)
self.showLandmarkBlockToggleGroup=group self.showLandmarkBlockToggleGroup=group
else: else:
for i in self.showLandmarkBlockToggleGroup: for i in self.showLandmarkBlockToggleGroup:
i.clearColor() i.clearColor()
for point, marker in self.pointDict.items():
if (point.getPointType() == DNASuitPoint.FRONTDOORPOINT):
marker.setColor(0,0,1,1)
marker.setScale(0.5)
self.showLandmarkBlockToggleGroup=None self.showLandmarkBlockToggleGroup=None
def pdbBreak(self): def pdbBreak(self):