kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #25213
Re: Python scripting plot options .SetColor() gets ignored
On Sat, 25 Jun 2016 21:58:27 +0100
"Paul \"LeoNerd\" Evans" <leonerd@xxxxxxxxxxxxxx> wrote:
> It almost works. This works fine for the Edge_Cuts and F_SilkS layers,
> but still the F_Mask layer comes out in "front copper" red.
More on this:
It seems there's two separate code paths that are taken here, depending
on whether soldermask min thickness is 0 or > 0.
If the min thickness is > 0 then indeed the colour is taken from the
F_Mask layer setting, so
board.GetColorsSettings().SetLayerColor(F_Mask, colour)
is fine. But if min thickness is 0 then a totally different piece of
code comes in, and draws it instead using the PAD_FR_VISIBLE item
colour. For that we need
board.GetColorsSettings().SetItemColor(PAD_FR_VISIBLE, colour)
Is this difference intentional? Surely one would expect the same
setting to take effect for colouring a solder mask on the plot,
regardless of whether the min thickness is 0 or > 0.
--
Paul "LeoNerd" Evans
leonerd@xxxxxxxxxxxxxx
http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS
Attachment:
pgpzjoQRg9uu7.pgp
Description: OpenPGP digital signature
References