diff --git a/.scripts/foot_gen.py b/.scripts/foot_gen.py index 0eed083..4aaf4e8 100644 --- a/.scripts/foot_gen.py +++ b/.scripts/foot_gen.py @@ -95,7 +95,7 @@ for d in brd_drawings: # Keep only required foots saved = [] -while len(pcb.Footprints()) > 1: +while len(pcb.Footprints()) > 0: foot = pcb.Footprints().pop() if foot.GetReference() in new_foots.keys(): saved.append(foot) @@ -323,7 +323,7 @@ for [foot, pad_map] in sorted_foots: elif shape_type == pcbnew.PAD_SHAPE_CUSTOM: pad_shape = Pad.SHAPE_CUSTOM for d in foot.GraphicalItems(): - if type(d) is pcbnew.FP_TEXT and "User.Drawings" in d.GetLayerName(): + if type(d) is pcbnew.PCB_TEXT and "User.Drawings" in d.GetLayerName(): txt_sp = d.GetText().split(':',1) if pad_number != txt_sp[0]: continue