|
@@ -2320,11 +2320,14 @@ class LevelEditor(NodePath, PandaObject):
|
|
|
15, # arrow angle
|
|
15, # arrow angle
|
|
|
1) # arrow length
|
|
1) # arrow length
|
|
|
edgeLine.create()
|
|
edgeLine.create()
|
|
|
|
|
+ # Adjust color of highlighted lines
|
|
|
|
|
+ if edge in self.visitedEdges:
|
|
|
|
|
+ NodePath.setColor(edgeLine,1,0,0,1)
|
|
|
# Clean up:
|
|
# Clean up:
|
|
|
tempNode.removeNode()
|
|
tempNode.removeNode()
|
|
|
return edgeLine
|
|
return edgeLine
|
|
|
|
|
|
|
|
- def drawSuitPoint(self, pos, type, parent):
|
|
|
|
|
|
|
+ def drawSuitPoint(self, suitPoint, pos, type, parent):
|
|
|
marker = self.suitPointMarker.copyTo(parent)
|
|
marker = self.suitPointMarker.copyTo(parent)
|
|
|
marker.setName("suitPointMarker")
|
|
marker.setName("suitPointMarker")
|
|
|
marker.setPos(pos)
|
|
marker.setPos(pos)
|
|
@@ -2337,7 +2340,9 @@ class LevelEditor(NodePath, PandaObject):
|
|
|
elif (type == DNASuitPoint.SIDEDOORPOINT):
|
|
elif (type == DNASuitPoint.SIDEDOORPOINT):
|
|
|
marker.setColor(0,0.2,0.4)
|
|
marker.setColor(0,0.2,0.4)
|
|
|
marker.setScale(0.5)
|
|
marker.setScale(0.5)
|
|
|
- # v is relative to the grid
|
|
|
|
|
|
|
+ # Highlight if necessary
|
|
|
|
|
+ if suitPoint in self.visitedPoints:
|
|
|
|
|
+ marker.setColor(1,0,0,1)
|
|
|
return marker
|
|
return marker
|
|
|
|
|
|
|
|
def placeSuitPoint(self):
|
|
def placeSuitPoint(self):
|
|
@@ -2351,7 +2356,7 @@ class LevelEditor(NodePath, PandaObject):
|
|
|
# it returns the existing point
|
|
# it returns the existing point
|
|
|
suitPoint = DNASTORE.storeSuitPoint(self.currentSuitPointType, absPos)
|
|
suitPoint = DNASTORE.storeSuitPoint(self.currentSuitPointType, absPos)
|
|
|
if not self.pointDict.has_key(suitPoint):
|
|
if not self.pointDict.has_key(suitPoint):
|
|
|
- marker = self.drawSuitPoint(
|
|
|
|
|
|
|
+ marker = self.drawSuitPoint(suitPoint,
|
|
|
absPos, self.currentSuitPointType,
|
|
absPos, self.currentSuitPointType,
|
|
|
self.suitPointToplevel)
|
|
self.suitPointToplevel)
|
|
|
self.pointDict[suitPoint] = marker
|
|
self.pointDict[suitPoint] = marker
|
|
@@ -2422,7 +2427,9 @@ class LevelEditor(NodePath, PandaObject):
|
|
|
self.highlightConnectedRec(startPoint,
|
|
self.highlightConnectedRec(startPoint,
|
|
|
fReversePath)
|
|
fReversePath)
|
|
|
endPoint = edge.getEndPoint()
|
|
endPoint = edge.getEndPoint()
|
|
|
- if endPoint not in self.visitedPoints:
|
|
|
|
|
|
|
+ type = endPoint.getPointType()
|
|
|
|
|
+ if ((endPoint not in self.visitedPoints) and
|
|
|
|
|
+ (type == DNASuitPoint.STREETPOINT)):
|
|
|
self.highlightConnectedRec(endPoint,
|
|
self.highlightConnectedRec(endPoint,
|
|
|
fReversePath)
|
|
fReversePath)
|
|
|
|
|
|
|
@@ -2484,7 +2491,7 @@ class LevelEditor(NodePath, PandaObject):
|
|
|
numPoints = DNASTORE.getNumSuitPoints()
|
|
numPoints = DNASTORE.getNumSuitPoints()
|
|
|
for i in range(numPoints):
|
|
for i in range(numPoints):
|
|
|
point = DNASTORE.getSuitPointAtIndex(i)
|
|
point = DNASTORE.getSuitPointAtIndex(i)
|
|
|
- marker = self.drawSuitPoint(
|
|
|
|
|
|
|
+ marker = self.drawSuitPoint(point,
|
|
|
point.getPos(), point.getPointType(),
|
|
point.getPos(), point.getPointType(),
|
|
|
self.suitPointToplevel)
|
|
self.suitPointToplevel)
|
|
|
self.pointDict[point] = marker
|
|
self.pointDict[point] = marker
|