Skip to content

Commit

Permalink
Add 6.0.8 work-around for plotting layers
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Oct 5, 2022
1 parent d717719 commit e009f57
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pcbdraw/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,11 @@ def execute_plot_plan(self, to_plot: List[PlotAction]) -> None:
pass
popt.SetTextMode(pcbnew.PLOT_TEXT_MODE_STROKE)
for action in to_plot:
if len(action.layers) == 0:
continue
# Set the filename before opening the file as KiCAD 6.0.8
# requires it even for the SVG format
pctl.SetLayer(action.layers[0])
pctl.OpenPlotfile(action.name, pcbnew.PLOT_FORMAT_SVG, action.name)
for l in action.layers:
pctl.SetColorMode(False)
Expand Down

0 comments on commit e009f57

Please sign in to comment.