Index: trunk/src_plugins/io_tedax/stackup.c =================================================================== --- trunk/src_plugins/io_tedax/stackup.c (revision 32289) +++ trunk/src_plugins/io_tedax/stackup.c (revision 32290) @@ -273,7 +273,7 @@ return -1; } -int tedax_stackup_fsave(tedax_stackup_t *ctx, pcb_board_t *pcb, const char *stackid, FILE *f) +int tedax_stackup_fsave(tedax_stackup_t *ctx, pcb_board_t *pcb, const char *stackid, FILE *f, pcb_layer_type_t lyt) { int prefix = 0; rnd_layergrp_id_t gid; @@ -288,8 +288,11 @@ char tname[66], *tn; const char *lloc; pcb_layer_t *ly = NULL; - const tedax_layer_t *lt = tedax_layer_lookup_by_type(pcb, grp, &lloc); + const tedax_layer_t *lt; + if ((grp->ltype & lyt) == 0) continue; + + lt = tedax_layer_lookup_by_type(pcb, grp, &lloc); if (lt == NULL) { char *title = rnd_strdup_printf("Unsupported group: %s", grp->name); pcb_io_incompat_save(pcb->Data, NULL, "stackup", title, "Layer type/purpose/location is not supported by tEDAx, layer will be omitted from the save."); @@ -340,7 +343,7 @@ } tedax_stackup_init(&ctx); fprintf(f, "tEDAx v1\n"); - res = tedax_stackup_fsave(&ctx, pcb, stackid, f); + res = tedax_stackup_fsave(&ctx, pcb, stackid, f, PCB_LYT_ANYTHING); fclose(f); tedax_stackup_uninit(&ctx); return res; Index: trunk/src_plugins/io_tedax/stackup.h =================================================================== --- trunk/src_plugins/io_tedax/stackup.h (revision 32289) +++ trunk/src_plugins/io_tedax/stackup.h (revision 32290) @@ -12,7 +12,7 @@ void tedax_stackup_uninit(tedax_stackup_t *ctx); int tedax_stackup_save(pcb_board_t *pcb, const char *stackid, const char *fn); -int tedax_stackup_fsave(tedax_stackup_t *ctx, pcb_board_t *pcb, const char *stackid, FILE *f); +int tedax_stackup_fsave(tedax_stackup_t *ctx, pcb_board_t *pcb, const char *stackid, FILE *f, pcb_layer_type_t lyt); int tedax_stackup_load(pcb_board_t *pcb, const char *fn, const char *blk_id, int silent); int tedax_stackup_fload(tedax_stackup_t *ctx, pcb_board_t *pcb, FILE *f, const char *blk_id, int silent); Index: trunk/src_plugins/io_tedax/tboard.c =================================================================== --- trunk/src_plugins/io_tedax/tboard.c (revision 32289) +++ trunk/src_plugins/io_tedax/tboard.c (revision 32290) @@ -129,7 +129,7 @@ tedax_global_subc_fwrite(&plc, f); fputc('\n', f); - if (tedax_stackup_fsave(&ctx, pcb, stackupid, f) != 0) { + if (tedax_stackup_fsave(&ctx, pcb, stackupid, f, PCB_LYT_ANYTHING) != 0) { rnd_message(RND_MSG_ERROR, "internal error: failed to save the stackup\n"); goto error; } Index: trunk/src_plugins/io_tedax/trouter.c =================================================================== --- trunk/src_plugins/io_tedax/trouter.c (revision 32289) +++ trunk/src_plugins/io_tedax/trouter.c (revision 32290) @@ -96,7 +96,7 @@ tedax_stackup_init(&ctx); fputc('\n', f); - if (tedax_stackup_fsave(&ctx, pcb, stackupid, f) != 0) { + if (tedax_stackup_fsave(&ctx, pcb, stackupid, f, PCB_LYT_COPPER) != 0) { rnd_message(RND_MSG_ERROR, "internal error: failed to save the stackup\n"); goto error; }