Allow multi-layer plotting from python.

Fixes https://gitlab.com/kicad/code/kicad/issues/12314
This commit is contained in:
Jeff Young 2022-09-11 23:36:53 +01:00
parent 45fb0107a0
commit 95874aeeb4
1 changed files with 1 additions and 1 deletions

View File

@ -1176,7 +1176,7 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aL
renderSettings->LoadColors( aPlotOpts->ColorSettings() ); renderSettings->LoadColors( aPlotOpts->ColorSettings() );
renderSettings->SetDefaultPenWidth( Millimeter2iu( 0.0212 ) ); // Hairline at 1200dpi renderSettings->SetDefaultPenWidth( Millimeter2iu( 0.0212 ) ); // Hairline at 1200dpi
if( aLayer < GAL_LAYER_ID_END ) if( aLayer >= 0 && aLayer < GAL_LAYER_ID_END )
renderSettings->SetLayerName( aBoard->GetLayerName( ToLAYER_ID( aLayer ) ) ); renderSettings->SetLayerName( aBoard->GetLayerName( ToLAYER_ID( aLayer ) ) );
plotter->SetRenderSettings( renderSettings ); plotter->SetRenderSettings( renderSettings );