7311f07eaf
*) Extend SWIG support deeper into the BOARD class.
*) Move swig *.i files into a directory identified for SWIG, in preparation
for a parallel universe involving Phoenix's SIP.
*) Move swig files which will be common to both eeschema and pcbnew into
common/swig.
*) Sketch out a "common" python module, and plan on dovetailing that into a
libkicad_shared.{dll,so}
*) Add common/swig/ki_exceptions.i and define a macro HANDLE_EXCEPTIONS()
which is to be applied to any function which needs C++ to python
exception translation.
*) Move the test for SWIG tool into top level CMakeLists.txt file for use
in all python modules beyond pcbnew, i.e. eeschema and common.
*) Add SWIG_MODULE_pcbnew_EXTRA_DEPS which generates a better Makefile, one
which rebuilds the swig generated *.cxx file when one of its dependencies
change.
*) Re-architect the board.i file so that it can be split into multiple *.i
files easily.
*) Make some KIWAY from python progress, in preparation for Modular KiCad
phase III.
15 lines
352 B
Python
15 lines
352 B
Python
#!/usr/bin/env python
|
|
import sys
|
|
from pcbnew import *
|
|
|
|
filename=sys.argv[1]
|
|
|
|
pcb = LoadBoard(filename)
|
|
|
|
for module in pcb.GetModules():
|
|
print "* Module: %s"%module.GetReference()
|
|
module.Value().SetVisible(False) # set Value as Hidden
|
|
module.Reference().SetVisible(True) # set Reference as Visible
|
|
|
|
pcb.Save("mod_"+filename)
|