Saving to and loading from a file is not implemented, but you can save the current visible layer set onto a stack (Push), remove the top set from the stack and make those layers visible (Pop) or click any element on the stack to immediately set those layers as visible.
It also serves as a simple example for
Implementing ActionPlugin in a python script, and
Integrating a gui built with wxFormBuilder.
Let me know if it works for you!
Tested on KiCad recent nightly.
Looks good and I will check it out, thanks. It really should be built into KiCad, though - it’s crazy to have to do so many clicks on two different panels just to turn on or off everything on top or bottom.
I don’t think they have any official designation, they are just nightly builds from the master branch. I guess they are effectively 5.0.0 beta versions. But I think most people call them nightly builds or dev builds.
BTW, selectable layer views is #8 on the KiCad wishlist, so this plugin could be quite popular
It seems there is a problem with the build systems. (boost lib problems again)
Otherwise 4.0.7 would already have been released. (There where also two major bugs that made it necessary to postpone the release date by more than two weeks.)
4.0.7 will be 4.0.6 with bugs fixed and few or zero new features. Especially nothing will change that affects backwards compatibility with any of the 4.0.x releases.
As 4.0.0 is almost two year old, Nightly builds have evolved away a lot.
I call them “official” Nightlies as they are described on the KiCad website and bugs are managed on Launchpad
I’m experimenting with adjusting the visual components in Layer Manager to integrate the push/pop functionality of Layer Visibility Sets. It’s not perfect yet, but getting close. I am trying to get it so that the LayerManager can dock into its normal place. Still having problems with width adjustment of the windows. And a little resizing issues, too. I went with clickable labels (with explanatory tooltips) so the space overhead is lower. Left to right is push, pop, and dock.
Would it be possible to add some installation and usage information to the Read Me file beyond “Layer View Set.py A gui for saving, loading view sets as well as interacting with a stack of view sets for changing which layers are viewed within KiCad.” Documentation seems to be a dying art
LayerViewSet is a ActionPlugin and is installed similar to other Action Plugins.
Place the file in
Or the equivalent in MacOS or Linux
(there may be a user-level directory for such files, but I am not aware of it at the moment.)
Within KiCad pcbnew, select the Tools > External Plugins > Refresh Plugins
LayerViewSet dialog box is shown when the LayerViewSet menu item is selected.
A note on integration: it doesn’t integrate with the Layer Manager, but only with the KiCad frame. This means it doesn’t float around with the Layer Manager when you decouple the Layer Manager from the KiCad frame. Ideally, LayerViewSet would move around and float with the Layer Manager itself, but I haven’t figured that out yet.
And I’m still working on tweaking the title bar. Not sure of the right combination to make it work similarly to “Visibles”.
The “Click on any label.” is where message text will go to indicate progress (if any messages are needed, otherwise I’ll remove it)
Here’s a big release. This includes a lot of improvements. I’ve worked around the issue with checkboxes (now I am setting the checkboxes appropriately) but still haven’t gotten around the issue of layers not updating in the layout view without switching canvases (and back).
This fully integrates into KiCad: you can dock the tool anywhere. I’ve shown my favorite place. I’ve shortened the label names to one line, and provided the full list of layers and renders in the tooltip to the View Set button.
If a button icon/word isn’t clear, just hover over it to get a full description of what it does. I’ve also updated the README.md that should cover most uses.
Hi, Greg It’s a really nice feature, but in my opinion the interface is a bit clumsy. Unfortunately, can’t try this plugin in business, so my opinion is based only on your pictures. From the first glance it’s hard to say what the buttons do (let’s forget that you explained it earlier). I can suggest my vision: if you are implementing a stack of view perspectives, you need two buttons - push and restore. A list of perspectives may be maintained by wxListBox. It would be nice if the user could change the name of the perspective (e.g., I can prepare “Front view”, “Bottom view”, “Mechanical” etc.). I hope my feedback can be useful)