I’d like to find out why any LineSegs I draw aren’t affected when I call .setAlphaScale() on a parent. Everything else fades, so afaik all transparency-related settings are fine. Even when I call .setColor() with a non-unity alpha value, the lines are always completely opaque. For reference sake, here are a few relevant sections of my code.
def draw(self):
# ...
self.anchor = render.attachNewNode('Actor')
# ...
def _draw_line_segs(self, aNode, aColor, aPoints):
Lines = LineSegs()
Lines.setColor(aColor[0], aColor[1], aColor[2], 1)
Lines.setThickness(1)
if len(aPoints):
Lines.moveTo(aPoints[0][0], aPoints[0][1], aPoints[0][2])
for Point in aPoints[1:]:
Lines.drawTo(Point[0], Point[1], Point[2])
Node = Lines.create()
NP = NodePath(Node)
NP.reparentTo(aNode)
return Lines
def func_x(self):
self.anchor.setAlphaScale(0.2)
# everything fades except lines
Note that self.anchor is passed to _draw_line_segs(). Any advice here? The goal is to make wires fade slightly along with everything else when I call .setAlphaScale() on self.anchor.
Thanks!