← Back to team overview

kicad-developers team mailing list archive

Re: Fwd: Python plugin for pcbnew

 

RE: FootprintLoad()

There are two ways you could go:

a) use swig functions on class MODULE and add features that way, one by one in python.
Return the MODULE when you are done "loading" the footprint.


b) construct a pretty string, return that to C++ land but still within your adapter, i.e.
still inside ADAPTER::FootprintLoad(), before returning from that C++ function.  Then
while in there PCB_IO::Parse() the pretty string and return the constructed MODULE coming
back from the Parse() function.


This latter path, b) was what I was thinking for the SWEET support, and you can see that
its API is different from PLUGIN.  It returned SWEET strings on part loading.  That was to
support SWEET's inheritance model.


Dick



Follow ups

References