cross-posting https://forum.freecadweb.org/viewtopic. ... 81#p312581 here...
I tweaked a bit the Draft VisGroup today, and bingo, we have a layers system in FreeCAD!
It is now in master in git commit 5ee99ca4e
It's basically just an extension of the former Draft VisGroup tool, that has been renamed to Layer, since it's not a group anymore.
- You can add objects to/from layers by dragging them to/from the layers in the tree
- It doesn't remove objects from their groups, so an object can be both in a group and a layer. The layers system is fully independent
- Layers have an "OverrideChildren" property that you can set to False if you don't want to apply the layer colors to children
- If you turn a layer on/off, everything inside is turned on/off too
- Layers live in a special "Layers" group
- Brand new experimental feature: layer icons take the color of the layer! I'm not sure if this won't make things heavy, so let's keep an eye on it!
I had never played before with drag and drop support in python objects... Pretty cool, lots of possibilities...
I'lll let it live its life a little bit, if all goes well we can add support to it to the IFC and DXF importers.