How can I use Python to add SMD pads with a custom layer set to my PCB in KiCad?
Adding SMD pads with a custom layer set to a PCB in KiCad can be done using Python scripting. The script snippet provided demonstrates how to create a new footprint, set its position, and add an SMD pad to it. It configures the pad size, shape, attribute, and customizes the layer set:

```python
import pcbnew

# Initialize PCB and create a new footprint
board = pcbnew.GetBoard()
module = pcbnew.FOOTPRINT(board)
module.SetPosition(pcbnew.wxPointMM(x, y))
board.Add(module)

# Create and configure an SMD pad
lset = pcbnew.LSET()
lset.AddLayer(pcbnew.F_Cu)
pcb_pad = pcbnew.PAD(module)
# ... (set pad properties including custom layer set)
module.Add(pcb_pad)
```

This approach is useful for creating custom footprints with SMD pads, particularly when specific layers are required for the pads in a PCB design.