Skip to content

Commit bd36a8a

Browse files
committed
Assemble KICAD_FOOTPRINT_DIR from version
1 parent 201df12 commit bd36a8a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SparkFunKiCadPanelizer/panelizer/panelizer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,9 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
981981
# Add fiducials
982982

983983
# Find the KiCad Fiducial footprints
984-
fiducialPath = os.getenv('KICAD7_FOOTPRINT_DIR') # This works when running the plugin inside KiCad
984+
kicadVersion = pcbnew.GetBuildVersion().split('.')[0]
985+
fiducialEnv = "KICAD{}_FOOTPRINT_DIR".format(kicadVersion)
986+
fiducialPath = os.getenv(fiducialEnv ) # This works when running the plugin inside KiCad
985987
if fiducialPath is not None:
986988
fiducialPath = os.path.join(fiducialPath,"Fiducial.pretty")
987989
else:

0 commit comments

Comments
 (0)