Index: trunk/src/hid_cam.c =================================================================== --- trunk/src/hid_cam.c (revision 23630) +++ trunk/src/hid_cam.c (revision 23631) @@ -37,6 +37,8 @@ #include "layer_vis.h" #include "plug_io.h" +char *pcb_cam_base = NULL; + char *pcb_layer_to_file_name(char *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style) { const pcb_virt_layer_t *v; @@ -482,6 +484,10 @@ else if (ctx->vl != NULL) gds_append_str(s, ctx->vl->name); } + if (strncmp(*input, "base%", 5) == 0) { + (*input) += 5; + gds_append_str(s, pcb_cam_base == NULL ? "unspecifiedbase" : pcb_cam_base); + } else if (strncmp(*input, "top_offs", 8) == 0) { int tune, from_top = -1; pcb_layergrp_t *tcop = pcb_get_grp(&PCB->LayerGroups, PCB_LYT_TOP, PCB_LYT_COPPER); Index: trunk/src/hid_cam.h =================================================================== --- trunk/src/hid_cam.h (revision 23630) +++ trunk/src/hid_cam.h (revision 23631) @@ -27,6 +27,8 @@ int exported_grps; } pcb_cam_t; +extern char *pcb_cam_base; /* substitute %base% with this */ + int pcb_cam_begin(pcb_board_t *pcb, pcb_cam_t *dst, const char *src, const pcb_hid_attribute_t *attr_tbl, int numa, pcb_hid_attr_val_t *options); /* Finish cam export, free all memory, mark cam export inactive and report