Enable layer arg for fp export svg
This commit is contained in:
parent
b4994a7fa1
commit
4d811ba975
|
@ -44,6 +44,7 @@ public:
|
|||
wxString m_colorTheme;
|
||||
|
||||
bool m_blackAndWhite;
|
||||
LSET m_printMaskLayer;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -33,6 +33,8 @@
|
|||
|
||||
CLI::FP_EXPORT_SVG_COMMAND::FP_EXPORT_SVG_COMMAND() : EXPORT_PCB_BASE_COMMAND( "svg" )
|
||||
{
|
||||
addLayerArg( false );
|
||||
|
||||
m_argParser.add_argument( "-t", ARG_THEME )
|
||||
.default_value( std::string() )
|
||||
.help( UTF8STDSTR( _( "Color theme to use (will default to pcbnew settings)" ) ) );
|
||||
|
@ -50,6 +52,10 @@ CLI::FP_EXPORT_SVG_COMMAND::FP_EXPORT_SVG_COMMAND() : EXPORT_PCB_BASE_COMMAND( "
|
|||
|
||||
int CLI::FP_EXPORT_SVG_COMMAND::doPerform( KIWAY& aKiway )
|
||||
{
|
||||
int baseExit = EXPORT_PCB_BASE_COMMAND::doPerform( aKiway );
|
||||
if( baseExit != EXIT_CODES::OK )
|
||||
return baseExit;
|
||||
|
||||
std::unique_ptr<JOB_FP_EXPORT_SVG> svgJob = std::make_unique<JOB_FP_EXPORT_SVG>( true );
|
||||
|
||||
svgJob->m_libraryPath = FROM_UTF8( m_argParser.get<std::string>( ARG_INPUT ).c_str() );
|
||||
|
@ -65,6 +71,11 @@ int CLI::FP_EXPORT_SVG_COMMAND::doPerform( KIWAY& aKiway )
|
|||
|
||||
svgJob->m_colorTheme = FROM_UTF8( m_argParser.get<std::string>( ARG_THEME ).c_str() );
|
||||
|
||||
if( m_selectedLayers.count() > 0 )
|
||||
svgJob->m_printMaskLayer = m_selectedLayers;
|
||||
else
|
||||
svgJob->m_printMaskLayer = LSET::AllLayersMask();
|
||||
|
||||
int exitCode = aKiway.ProcessJob( KIWAY::FACE_PCB, svgJob.get() );
|
||||
|
||||
return exitCode;
|
||||
|
|
|
@ -749,7 +749,7 @@ int PCBNEW_JOBS_HANDLER::doFpExportSvg( JOB_FP_EXPORT_SVG* aSvgJob, const FOOTPR
|
|||
svgPlotOptions.m_outputFile = outputFile.GetFullPath();
|
||||
svgPlotOptions.m_mirror = false;
|
||||
svgPlotOptions.m_pageSizeMode = 2; // board bounding box
|
||||
svgPlotOptions.m_printMaskLayer = LSET::AllLayersMask();
|
||||
svgPlotOptions.m_printMaskLayer = aSvgJob->m_printMaskLayer;
|
||||
svgPlotOptions.m_plotFrame = false;
|
||||
|
||||
if( !PCB_PLOT_SVG::Plot( brd.get(), svgPlotOptions ) )
|
||||
|
|
Loading…
Reference in New Issue