diff --git a/include/layer_ids.h b/include/layer_ids.h
index e1117b1783..1cc1f99f10 100644
--- a/include/layer_ids.h
+++ b/include/layer_ids.h
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
  * Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 2007-2023 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2007-2024 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -544,6 +544,17 @@ inline bool IsExternalCopperLayer( int aLayerId )
     return aLayerId == F_Cu || aLayerId == B_Cu;
 }
 
+/**
+ * Tests whether a layer is an inner (In1_Cu to In30_Cu) copper layer.
+ *
+ * @param aLayerId = Layer  to test
+ * @return true if aLayer is a valid inner copper layer
+ */
+inline bool IsInnerCopperLayer( int aLayerId )
+{
+    return IsCopperLayer( aLayerId ) && !IsExternalCopperLayer( aLayerId );
+}
+
 /**
  * Test whether a layer is a non copper layer.
  *
diff --git a/pcbnew/exporters/step/exporter_step.cpp b/pcbnew/exporters/step/exporter_step.cpp
index 14176b48b1..b2fbf97067 100644
--- a/pcbnew/exporters/step/exporter_step.cpp
+++ b/pcbnew/exporters/step/exporter_step.cpp
@@ -468,6 +468,12 @@ bool EXPORTER_STEP::buildGraphic3DShape( BOARD_ITEM* aItem, VECTOR2D aOrigin )
     if( !m_layersToExport.Contains( pcblayer ) )
         return false;
 
+    if( IsCopperLayer( pcblayer ) && !m_params.m_ExportTracksVias )
+        return false;
+
+    if( IsInnerCopperLayer( pcblayer ) && !m_params.m_ExportInnerCopper )
+        return false;
+
     int maxError = m_board->GetDesignSettings().m_MaxError;
 
     switch( aItem->Type() )