Index: trunk/src/hid_cam.c =================================================================== --- trunk/src/hid_cam.c (revision 24370) +++ trunk/src/hid_cam.c (revision 24371) @@ -53,11 +53,29 @@ if (flags == 0) flags = pcb_layer_flags(PCB, lid); + if (style == PCB_FNS_pcb_rnd) { + const char *sloc, *styp; + group = pcb_layer_get_group(PCB, lid); + sloc = pcb_layer_type_bit2str(flags & PCB_LYT_ANYWHERE); + styp = pcb_layer_type_bit2str(flags & (PCB_LYT_ANYTHING | PCB_LYT_VIRTUAL)); + if (sloc == NULL) sloc = "global"; + if (styp == NULL) styp = "none"; + if (purpose == NULL) purpose = "none"; + if (group < 0) { + sprintf(dest, "%s.%s.%s.none", sloc, styp, purpose); + } + else + sprintf(dest, "%s.%s.%s.%ld", sloc, styp, purpose, group); + return dest; + } + if (flags & PCB_LYT_BOUNDARY) { strcpy(dest, "outline"); return dest; } + /* NOTE: long term only PCB_FNS_pcb_rnd will be supported and the rest, + below, will be removed */ v = pcb_vlayer_get_first(flags, purpose, purpi); if (v != NULL) { strcpy(dest, v->name); @@ -64,7 +82,7 @@ return dest; } - + group = pcb_layer_get_group(PCB, lid); nlayers = PCB->LayerGroups.grp[group].len; single_name = pcb_layer_name(PCB->Data, lid); Index: trunk/src/hid_cam.h =================================================================== --- trunk/src/hid_cam.h (revision 24370) +++ trunk/src/hid_cam.h (revision 24371) @@ -68,6 +68,8 @@ #define PCB_DERIVE_FN_SUFF_LEN 20 typedef enum pcb_file_name_style_e { + /* The only style that will be available long term: native */ + PCB_FNS_pcb_rnd, /* Files for copper layers are named top, groupN, bottom. */ PCB_FNS_fixed, /* Groups with multiple layers are named as above, else the single