direct: Fix DirectGrid alpha issue and getVertexColor error (#1793)

Fixes #1292
This commit is contained in:
TRIGON69 2025-12-30 01:33:48 +05:30 committed by GitHub
parent 585c58198a
commit 97de7863e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -79,8 +79,8 @@ class LineNodePath(NodePath):
def getVertex(self, index):
return self.lineSegs.getVertex(index)
def getVertexColor(self):
return self.lineSegs.getVertexColor()
def getVertexColor(self, index):
return self.lineSegs.getVertexColor(index)
def drawArrow(self, sv, ev, arrowAngle, arrowLength):
"""

View File

@ -33,7 +33,7 @@ class DirectGrid(NodePath, DirectObject):
self.centerLines = LineNodePath(self.lines)
self.centerLines.lineNode.setName('centerLines')
self.centerLines.setColor(VBase4(1, 0, 0, 0))
self.centerLines.setColor(VBase4(1, 0, 0, 1))
self.centerLines.setThickness(3)
# Small marker to hilight snap-to-grid point