Commit Graph

215 Commits

Author SHA1 Message Date
Jon Evans cb722c6bfa Code style 2021-03-24 18:11:32 -04:00
qu1ck 75819206a0 Add support for dark theme in plugin icons
Action plugin authors can specify alternative icon path for dark theme.
If it's not specified then standard icon will be used for both light and
dark themes. If neither icon is specified then the default puzzle piece
icon is used.

Fixes #7984
2021-03-24 21:59:30 +00:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
jean-pierre charras af88b01068 export_vrml: Better export of pad shapes, both on copper and paste layers.
It removes duplicate code between Pcbnew and the vrml exporter.
Remove also an useless option (plain board) that exported just the board body.
2021-03-18 20:43:27 +01:00
Jean-Samuel Reynaud e377f2667e Adding COMMIT support before/after invocation of a python script
Allows undo/redo of ACTION_SCRIPT commands
2021-03-18 12:52:17 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00
Ian McInerney 908de37e7c Don't hardcode the file extensions where possible 2021-03-03 01:13:59 +00:00
qu1ck cc6df515a1 Make ARCs accessible from python 2021-03-01 17:34:47 +00:00
Jeff Young 061218e567 Take a stab at fixing Python build issue. 2021-02-27 23:56:47 +00:00
Jon Evans eae9e954c3 Hide BOARD internals that shouldn't be wrapped from swig 2021-02-27 08:54:21 -05:00
Marek Roszko b82fcbcad6 More exception var disuse warnings 2021-02-26 19:30:58 -05:00
jean-pierre charras 8beeb368d2 Scripting: Fix missing utf8 to unicode string conversion in swig file
So non ASCII7 chars in .py filenames were non working, especially on Windows.
Fixes #5507
https://gitlab.com/kicad/code/kicad/issues/5507
2021-02-21 11:38:10 +01:00
Jon Evans 1ab17dd2e7 MSVC: don't set python home when running from build dir
This allows you to specify your python home via the
environment and get a working python setup when running
in-place.
2021-02-14 09:34:25 -05:00
Seth Hillbrand 8c2fe42ef0 More Undo/Redo Cleanup.
Don't need the reference point or container action type.  Clearing this
command signatures to prevent future confusion/use
2021-02-12 11:26:48 -08:00
Marek Roszko b21da9672f Adjust py_sethome for the new path 2021-02-10 21:44:33 -05:00
Wayne Stambaugh 5ecef204cd Coding policy fixes.
Using "this->" violates coding policy section 2.7.
2021-02-09 11:35:43 -05:00
qu1ck 5c3ee0443c Make footprint properties accessible from python
Now that footprint properties inherit custom fields from schematic
they are very useful.

Setting custom properties from python will also be handy in plugins
that need to somehow mark their own objects.
2021-02-05 02:31:48 +00:00
Marek Roszko 30ba3aa240 Get python loading the new "user scripting" paths 2021-01-28 23:45:53 -05:00
Marek Roszko 2807a37fc0 Create a stock scripting path helper 2021-01-27 19:12:18 -05:00
Marek Roszko 28c6967dbc Start trying to shuffle around path management 2021-01-27 19:12:18 -05:00
qu1ck 07d4a28024 Improvements to pcbnew action plugins settings panel
1. Add open plugins directory button (same as in tools menu)
2. Add show plugin errors button to help debug issues
2021-01-20 09:09:53 +00:00
Seth Hillbrand e3e9bfc1b8 Fix compile error 2021-01-13 13:21:27 -08:00
Seth Hillbrand 605dcfbedf Fix Windows script location
Windows has arbitrary installation locations, so reference relative to
the executable
2021-01-13 13:11:26 -08:00
Seth Hillbrand b57ad4b2f9 Correct SWIG path
Don't offset from executable, this is an absolute path

Fixes https://gitlab.com/kicad/code/kicad/issues/7089
2021-01-13 12:34:04 -08:00
Seth Hillbrand 2cb8dff650 Use KICAD_DATA for data path lookup in scripting
Fixes https://gitlab.com/kicad/code/kicad/issues/7036
2021-01-12 08:22:17 -08:00
Michael Kavanagh dc83cb7a41 Icons: general tweaks and pixel alignment
+ remove some unused icons
2021-01-11 23:31:25 +00:00
Jon Evans d6448ce6b4 Expose settings manager to python
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6989
2021-01-08 16:47:20 -05:00
Marek Roszko 84dd78e01d Fix the install location for vcpkg built python modules 2021-01-07 00:08:11 -05:00
Thomas Pointhuber 3b25e7344a Fix deprecation warning. PyEval_InitThreads() is not needed for Python >= 3.7
See: https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads

With Python 3.7 this function is called by Py_Initialize()
With Python 3.9 this function is deprecated and does nothing
2020-12-27 19:18:49 +01:00
Jeff Young 3b35bfc0a5 Don't write out synthetic severities (they're headings).
Fixes https://gitlab.com/kicad/code/kicad/issues/6726
2020-12-14 13:34:53 +00:00
Cameron McQuinn f225e95ffc FIx BOARD class SWIG interface
Commit b1f0bf7 changed netinfo.h to use more consistent naming, but the SWIG board.i file still references the old name.
2020-12-13 11:55:10 +00:00
Jeff Young d094f86b1a Finish module cleanup (except for xpms). 2020-11-14 22:00:12 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
jean-pierre charras 103dbb9fbd Some fixes in python footprint wizards 2020-11-14 13:38:44 +01:00
Dominik Wernberger a4650e7269 Rename GetModules to GetFootprints 2020-11-14 09:37:45 +00:00
Wayne Stambaugh 18fac23c35 Fix python module build error. 2020-11-13 14:37:52 -05:00
Jeff Young 34b13e66bf Fix typo in SWIG stuff. 2020-11-13 17:55:54 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Simon Richter 1faee7fdce Fix SWIG includes 2020-11-12 12:25:11 +01:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Jeff Young 6417015b8a Harvest -> Export 2020-11-09 17:21:47 +00:00
Jeff Young 115fd1d7f3 Move track-to-zone testing to RTrees.
Also implemente pad-to-zone testing and removes the control in the
GUI (now that it's fast).
2020-10-31 15:45:41 +00:00
Jeff Young adfc9f1288 Move File > Archive Footprints to Tools > Harvest Footprints.
CHANGED.

Also corrects references so they fit the generic pattern.

Fixes https://gitlab.com/kicad/code/kicad/issues/4518
2020-10-21 12:41:37 +01:00
Seth Hillbrand f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
jean-pierre charras f6b4b66a86 Avoid include wx/wx.h in many files that do not actually use this include.
Including wx.h includes the full set of wxWidgets include files, that is not good,
and can create some conflicts with some Windows headers on msys2.
2020-10-18 18:21:34 +02:00
qu1ck e784743284 Fix pcbnew drawings api
Add some basic tests
2020-10-12 16:38:32 +00:00
Michael Kavanagh c40483d18a Cleanup: Move KiCad files into plugins folder 2020-10-12 16:36:08 +00:00