KICAD IPC API only partly changes a footprint side when changing layer
Description
When using Kicad IPC API (through kicad-python), it is impossible to properly change the face for a component. When modifying the value of footprint.layer, only a part of the footprint is swapped.
Steps to reproduce
- Create a test schematic + board with two resistors. Use pcbnew to put R2 on the bottom layer.
- Run the following script, that is expected to put R1 on the bottom side
from kipy import KiCad
board = KiCad().get_board()
footprints = board.get_footprints()
for f in footprints:
print(f.reference_field.text.value,f.layer)
# This shows 3 for TOP and 34 for BOT
footprints[0].layer=34
board.update_items(footprints)
... but in the info pane, the layer is set as B.Cu !

And in the 3D view, we have the copper&silk on top side:

But the 3D part on the bottom:

KiCad Version
Application: KiCad PCB Editor x64 on x64
Version: 9.0.4, release build
Libraries:
wxWidgets 3.2.8
FreeType 2.13.3
HarfBuzz 10.2.0
FontConfig 2.15.0
Platform: Windows 11 (build 26100), 64-bit edition, 64 bit, Little endian, wxMSW
OpenGL: Intel, Intel(R) Iris(R) Xe Graphics, 4.6.0 - Build 32.0.101.6647
wxWidgets: 3.2.8 (wchar_t,wx containers)
Boost: 1.88.0
OCC: 7.9.1
Curl: 8.13.0-DEV
ngspice: 44
Compiler: Visual C++ 1942 without C++ ABI
KICAD_IPC_API=ON
Locale:
Lang: en_GB
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)
Edited by Ph Ma
