From a6fb687a0e01b03daa37c06b303f575abc9c55b6 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Tue, 21 Sep 2021 19:43:26 -0400 Subject: [PATCH] Fix rejection of default variables from exportpaths.cfg Fix #7670 --- utils/kicad2step/pcb/3d_resolver.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils/kicad2step/pcb/3d_resolver.cpp b/utils/kicad2step/pcb/3d_resolver.cpp index 7e92050ce4..505e75ed4c 100644 --- a/utils/kicad2step/pcb/3d_resolver.cpp +++ b/utils/kicad2step/pcb/3d_resolver.cpp @@ -456,10 +456,10 @@ bool S3D_RESOLVER::addPath( const SEARCH_PATH& aPath ) wxFileName path( tpath.m_Pathvar, "" ); path.Normalize(); - if( !path.DirExists() ) + if( !path.DirExists() ) { // suppress the message if the missing pathvar is the legacy KICAD6_3DMODEL_DIR variable - if( aPath.m_Pathvar != "${KICAD6_3DMODEL_DIR}" && + if( aPath.m_Pathvar != "${KIPRJMOD}" && aPath.m_Pathvar != "$(KICAD6_3DMODEL_DIR)" ) { wxString msg = _( "The given path does not exist" ); @@ -581,7 +581,10 @@ bool S3D_RESOLVER::readPathList( void ) continue; // never add on KICAD6_3DMODEL_DIR from a config file - if( !al.m_Alias.Cmp( "KICAD6_3DMODEL_DIR" ) ) + if( !al.m_Alias.Cmp( "${KICAD6_3DMODEL_DIR}" ) ) + continue; + + if( !al.m_Alias.Cmp( "${KIPRJMOD}" ) ) continue; if( !getHollerith( cfgLine, idx, al.m_Pathvar ) )