Files
create/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtensionPy.xml
Abdullah Tahiri 873e34cd6e Sketcher: Extend ViewProviderSketchGeometryExtension to hold the VisualLayerId
==============================================================================

In the Layers implementation there are User Layers, which have no direct impact on visualisation,
and allow to group conceptually related geometry into logical entities, and Visual Layers, which
define how geometries are visualised (or even whether they are visualised or not).

For User Layers, SketchObject is responsible for the definition of the layers, and SketcherGeometryExtension
is responsible for indicating the User Layer to which a geometry belongs (via a LayerId field).

For Visual Layers, ViewProviderSketch is responsible for the definition of the visual layers, and
ViewProviderSketchGeometryExtension is responsible for indicating the visual layer to which a geometry belongs.

With this commit, ViewProviderSketchGeometryExtension:
- takes over the responsibility of carrying a visual layer Id.
- is extended to be persistent and serialise the Id.
- is extended to be accesible from Python.
2023-03-02 20:42:48 +01:00

28 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="GeometryExtensionPy"
Name="ViewProviderSketchGeometryExtensionPy"
PythonName="SketcherGui.ViewProviderSketchGeometryExtension"
Twin="ViewProviderSketchGeometryExtension"
TwinPointer="ViewProviderSketchGeometryExtension"
Include="Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.h"
Namespace="SketcherGui"
FatherInclude="Mod/Part/App/GeometryExtensionPy.h"
FatherNamespace="Part"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Abdullah Tahiri" EMail="abdullah.tahiri.yo@gmail.com" />
<UserDocu>Describes a ViewProviderSketchGeometryExtension</UserDocu>
</Documentation>
<Attribute Name="VisualLayerId" ReadOnly="false">
<Documentation>
<UserDocu>
Sets/returns this geometry's Visual Layer Id.
</UserDocu>
</Documentation>
<Parameter Name="VisualLayerId" Type="Long"/>
</Attribute>
</PythonExport>
</GenerateModel>