diff --git a/src/Mod/Material/App/Array2DPy.xml b/src/Mod/Material/App/Array2DPy.xml deleted file mode 100644 index 4f679cd933..0000000000 --- a/src/Mod/Material/App/Array2DPy.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - 2D Array of material properties. - - - - The 2 dimensional array. - - - - - - The number of dimensions in the array, in this case 2. - - - - - - The number of rows in the array. - - - - - - The number of columns in the array. - - - - - - Get the row given the first column value - - - - - Get the value at the given row and column - - - - - Set the value at the given row and column - - - - diff --git a/src/Mod/Material/App/Array3DPy.xml b/src/Mod/Material/App/Array3DPy.xml deleted file mode 100644 index dd79ce6ee4..0000000000 --- a/src/Mod/Material/App/Array3DPy.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - 3D Array of material properties. - - - - The 3 dimensional array. - - - - - - The number of dimensions in the array, in this case 3. - - - - - - The number of columns in the array. - - - - - - The depth of the array (3rd dimension). - - - - - - Get the number of rows in the array at the specified depth. - - - - - Get the value at the given row and column - - - - - Get the column value at the given depth - - - - - Set the column value at the given depth - - - - - Set the value at the given depth, row, and column - - - - - Set the number of rows at the given depth - - - - diff --git a/src/Mod/Material/App/CMakeLists.txt b/src/Mod/Material/App/CMakeLists.txt index fecf64e763..825242fce7 100644 --- a/src/Mod/Material/App/CMakeLists.txt +++ b/src/Mod/Material/App/CMakeLists.txt @@ -42,56 +42,44 @@ else() ) endif() -generate_from_xml(Array2DPy) -generate_from_py_(Array2D) -generate_from_xml(Array3DPy) -generate_from_py_(Array3D) -generate_from_xml(MaterialFilterPy) -generate_from_py_(MaterialFilter) -generate_from_xml(MaterialFilterOptionsPy) -generate_from_py_(MaterialFilterOptions) -generate_from_xml(MaterialLibraryPy) -generate_from_py_(MaterialLibrary) -generate_from_xml(MaterialManagerPy) -generate_from_py_(MaterialManager) -generate_from_xml(MaterialPy) -generate_from_py_(Material) -generate_from_xml(ModelManagerPy) -generate_from_py_(ModelManager) -generate_from_xml(ModelPropertyPy) -generate_from_py_(ModelProperty) -generate_from_xml(MaterialPropertyPy) -generate_from_py_(MaterialProperty) -generate_from_xml(ModelPy) -generate_from_py_(Model) -generate_from_xml(UUIDsPy) -generate_from_py_(UUIDs) +generate_from_py(Array2D) +generate_from_py(Array3D) +generate_from_py(MaterialFilter) +generate_from_py(MaterialFilterOptions) +generate_from_py(MaterialLibrary) +generate_from_py(MaterialManager) +generate_from_py(Material) +generate_from_py(ModelManager) +generate_from_py(ModelProperty) +generate_from_py(MaterialProperty) +generate_from_py(Model) +generate_from_py(UUIDs) SET(Python_SRCS Exceptions.h - Array2DPy.xml + Array2D.pyi Array2DPyImp.cpp - Array3DPy.xml + Array3D.pyi Array3DPyImp.cpp - MaterialFilterOptionsPy.xml + MaterialFilterOptions.pyi MaterialFilterOptionsPyImp.cpp - MaterialFilterPy.xml + MaterialFilter.pyi MaterialFilterPyImp.cpp - MaterialLibraryPy.xml + MaterialLibrary.pyi MaterialLibraryPyImp.cpp - MaterialManagerPy.xml + MaterialManager.pyi MaterialManagerPyImp.cpp - MaterialPropertyPy.xml + MaterialProperty.pyi MaterialPropertyPyImp.cpp - MaterialPy.xml + Material.pyi MaterialPyImp.cpp - ModelManagerPy.xml + ModelManager.pyi ModelManagerPyImp.cpp - ModelPropertyPy.xml + ModelProperty.pyi ModelPropertyPyImp.cpp - ModelPy.xml + Model.pyi ModelPyImp.cpp - UUIDsPy.xml + UUIDs.pyi UUIDsPyImp.cpp ) SOURCE_GROUP("Python" FILES ${Python_SRCS}) diff --git a/src/Mod/Material/App/MaterialFilterOptionsPy.xml b/src/Mod/Material/App/MaterialFilterOptionsPy.xml deleted file mode 100644 index 6f793897c2..0000000000 --- a/src/Mod/Material/App/MaterialFilterOptionsPy.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Material filtering options. - - - - Include materials marked as favorite. - - - - - - Include recently used materials. - - - - - - Include empty folders. - - - - - - Include empty libraries. - - - - - - Include materials using the older legacy format. - - - - - diff --git a/src/Mod/Material/App/MaterialFilterPy.xml b/src/Mod/Material/App/MaterialFilterPy.xml deleted file mode 100644 index ac7825ff31..0000000000 --- a/src/Mod/Material/App/MaterialFilterPy.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Material filters. - - - - Name of the filter used to select a filter in a list - - - - - - Materials must include the specified models. - - - - - - Materials must have complete versions of the specified models. - - - - - diff --git a/src/Mod/Material/App/MaterialLibraryPy.xml b/src/Mod/Material/App/MaterialLibraryPy.xml deleted file mode 100644 index 2441a4eeaf..0000000000 --- a/src/Mod/Material/App/MaterialLibraryPy.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Material library. - - - - Name of the library - - - - - - String value of the icon. - - - - - - Local directory where the library is located. For non-local libraries this will be empty - - - - - - True if the library is local. - - - - - - True if the library is local. - - - - - diff --git a/src/Mod/Material/App/MaterialManagerPy.xml b/src/Mod/Material/App/MaterialManagerPy.xml deleted file mode 100644 index 49cb6e1ff6..0000000000 --- a/src/Mod/Material/App/MaterialManagerPy.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - Material descriptions. - - - - Get a material object by specifying its UUID - - - - - Get a material object by specifying its path and library name - - - - - Create a new material object by specifying the UUID of its parent - - - - - List of Material libraries. - - - - - - List of Materials. - - - - - - Get a list of materials implementing the specified model - - - - - Get a list of materials implementing the specified model, with values for all properties - - - - - Save the material in the specified library - - - - - Returns a filtered material list - - - - - Refreshes the material tree. Use sparingly as this is an expensive operation. - - - - diff --git a/src/Mod/Material/App/MaterialPropertyPy.xml b/src/Mod/Material/App/MaterialPropertyPy.xml deleted file mode 100644 index ddc7a06ee0..0000000000 --- a/src/Mod/Material/App/MaterialPropertyPy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Material property descriptions. - - - - The value of the material property. - - - - - - The property value is undefined. - - - - - \ No newline at end of file diff --git a/src/Mod/Material/App/MaterialPy.xml b/src/Mod/Material/App/MaterialPy.xml deleted file mode 100644 index 1681dc6eda..0000000000 --- a/src/Mod/Material/App/MaterialPy.xml +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - Material descriptions. - - - - Model library name. - - - - - - Model library path. - - - - - - Model icon path. - - - - - - Model name. - - - - - - Model directory relative to the library root. - - - - - - Unique model identifier. This is only valid after the material is saved. - - - - - - Description of the material. - - - - - - URL to a material reference. - - - - - - Reference for material data. - - - - - - Parent material UUID. - - - - - - deprecated -- Author and license information. - - - - - - Author information. - - - - - - License information. - - - - - - List of implemented models. - - - - - - List of implemented models. - - - - - - List of searchable tags. - - - - - - Add the physical model with the given UUID - - - - - Remove the physical model with the given UUID - - - - - Check if the material implements the physical model with the given UUID - - - - - Add the appearance model with the given UUID - - - - - Remove the appearance model with the given UUID - - - - - Check if the material implements the appearance model with the given UUID - - - - - Check if the material implements the physical model with the given UUID, and has values defined for each property - - - - - Check if the material implements the appearance model with the given UUID, and has values defined for each property - - - - - Check if the material implements the physical property with the given name - - - - - Check if the material implements the appearance property with the given name - - - - - Returns true of there are legacy properties - - - - - deprecated -- Dictionary of all material properties. - - - - - - deprecated -- Dictionary of material physical properties. - - - - - - deprecated -- Dictionary of material appearance properties. - - - - - - deprecated -- Dictionary of material legacy properties. - - - - - - Get the value associated with the property - - - - - Set the value associated with the property - - - - - Get the value associated with the property - - - - - Set the value associated with the property - - - - - Set the value associated with the property - - - - - Dictionary of MaterialProperty objects. - - - - - - Property keys - - - - - Property values - - - - - - diff --git a/src/Mod/Material/App/ModelManagerPy.xml b/src/Mod/Material/App/ModelManagerPy.xml deleted file mode 100644 index 693cf04238..0000000000 --- a/src/Mod/Material/App/ModelManagerPy.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - Material model descriptions. - - - - Get a model object by specifying its UUID - - - - - Get a model object by specifying its path - - - - - List of model libraries. - - - - - - List of local model libraries. - - - - - - List of model libraries. - - - - - diff --git a/src/Mod/Material/App/ModelPropertyPy.xml b/src/Mod/Material/App/ModelPropertyPy.xml deleted file mode 100644 index 195e5b4581..0000000000 --- a/src/Mod/Material/App/ModelPropertyPy.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - Material property descriptions. - - - - Property name. - - - - - - Property display friendly name. - - - - - - Property type. - - - - - - Property units category. - - - - - - URL to a detailed description of the property. - - - - - - Property description. - - - - - - List of array columns. - - - - - - UUID of the model in which the property is defined. - - - - - - True if the property is inherited. - - - - - - Add a model property column. - - - - \ No newline at end of file diff --git a/src/Mod/Material/App/ModelPy.xml b/src/Mod/Material/App/ModelPy.xml deleted file mode 100644 index 3d84a7e172..0000000000 --- a/src/Mod/Material/App/ModelPy.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - Material model descriptions. - - - - Model library name. - - - - - - Model library path. - - - - - - Model icon path. - - - - - - Model name. - - - - - - Model type. - - - - - - Model directory. - - - - - - Unique model identifier. - - - - - - Description of the model. - - - - - - URL to a detailed description of the model. - - - - - - Digital Object Identifier (see https://doi.org/) - - - - - - List of inherited models identified by UUID. - - - - - - Dictionary of model properties. - - - - - - Add an inherited model. - - - - - Add a model property. - - - - diff --git a/src/Mod/Material/App/UUIDsPy.xml b/src/Mod/Material/App/UUIDsPy.xml deleted file mode 100644 index 9daea8aeea..0000000000 --- a/src/Mod/Material/App/UUIDsPy.xml +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - Material model UUID identifiers. - - - - UUID for model System:Legacy/Father - - - - - - UUID for model System:Legacy/MaterialStandard - - - - - - UUID for model System:Mechanical/ArrudaBoyce - - - - - - UUID for model System:Mechanical/Density - - - - - - UUID for model System:Mechanical/Hardness - - - - - - UUID for model System:Mechanical/IsotropicLinearElastic - - - - - - UUID for model System:Mechanical/LinearElastic - - - - - - UUID for model System:Machining/Machinability - - - - - - UUID for model System:Mechanical/MooneyRivlin - - - - - - UUID for model System:Mechanical/NeoHooke - - - - - - UUID for model System:Mechanical/OgdenN1 - - - - - - UUID for model System:Mechanical/OgdenN2 - - - - - - UUID for model System:Mechanical/OgdenN3 - - - - - - UUID for model System:Mechanical/OgdenYld2004p18 - - - - - - UUID for model System:Mechanical/OrthotropicLinearElastic - - - - - - UUID for model System:Mechanical/PolynomialN1 - - - - - - UUID for model System:Mechanical/PolynomialN2 - - - - - - UUID for model System:Mechanical/PolynomialN3 - - - - - - UUID for model System:Mechanical/ReducedPolynomialN1 - - - - - - UUID for model System:Mechanical/ReducedPolynomialN2 - - - - - - UUID for model System:Mechanical/ReducedPolynomialN3 - - - - - - UUID for model System:Mechanical/Yeoh - - - - - - UUID for model System:Fluid/Fluid - - - - - - UUID for model System:Thermal/Thermal - - - - - - UUID for model System:Electromagnetic/Electromagnetic - - - - - - UUID for model System:Architectural/Architectural - - - - - - UUID for model System:Architectural/ArchitecturalRendering - - - - - - UUID for model System:Costs/Costs - - - - - - UUID for model System:Rendering/BasicRendering - - - - - - UUID for model System:Rendering/TextureRendering - - - - - - UUID for model System:Rendering/AdvancedRendering - - - - - - UUID for model System:Rendering/VectorRendering - - - - - - UUID for model System:Rendering/RenderAppleseed - - - - - - UUID for model System:Rendering/RenderCarpaint - - - - - - UUID for model System:Rendering/RenderCycles - - - - - - UUID for model System:Rendering/RenderDiffuse - - - - - - UUID for model System:Rendering/RenderDisney - - - - - - UUID for model System:Rendering/RenderEmission - - - - - - UUID for model System:Rendering/RenderGlass - - - - - - UUID for model System:Rendering/RenderLuxcore - - - - - - UUID for model System:Rendering/RenderLuxrender - - - - - - UUID for model System:Rendering/RenderMixed - - - - - - UUID for model System:Rendering/RenderOspray - - - - - - UUID for model System:Rendering/RenderPbrt - - - - - - UUID for model System:Rendering/RenderPovray - - - - - - UUID for model System:Rendering/RenderSubstancePBR - - - - - - UUID for model System:Rendering/RenderTexture - - - - - - UUID for model System:Rendering/RenderWB - - - - - - UUID for model System:Test/Test Model - - - - - diff --git a/src/Mod/Material/Gui/CMakeLists.txt b/src/Mod/Material/Gui/CMakeLists.txt index 7364da6c27..b867b1a11b 100644 --- a/src/Mod/Material/Gui/CMakeLists.txt +++ b/src/Mod/Material/Gui/CMakeLists.txt @@ -30,11 +30,10 @@ qt_find_and_add_translation(QM_SRCS "Resources/translations/*_*.ts" qt_create_resource_file(${Material_TR_QRC} ${QM_SRCS}) qt_add_resources(MatGui_QRC_SRCS Resources/Material.qrc ${Material_TR_QRC}) -generate_from_xml(MaterialTreeWidgetPy) -generate_from_py_(MaterialTreeWidget) +generate_from_py(MaterialTreeWidget) SET(Python_SRCS - MaterialTreeWidgetPy.xml + MaterialTreeWidget.pyi MaterialTreeWidgetPyImp.cpp ) SOURCE_GROUP("Python" FILES ${Python_SRCS}) diff --git a/src/Mod/Material/Gui/MaterialTreeWidgetPy.xml b/src/Mod/Material/Gui/MaterialTreeWidgetPy.xml deleted file mode 100644 index 182aa1eb0e..0000000000 --- a/src/Mod/Material/Gui/MaterialTreeWidgetPy.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - Material tree widget. - - - - Material UUID. - - - - - - Expand material tree. - - - - - - Include favorites in the material list. - - - - - - Include recently used materials in the material list. - - - - - - Include empty folders in the material list. - - - - - - Include empty libraries in the material list. - - - - - - Include legacy materials in the material list. - - - - - - Set the material filter or list of filters. - - - - - Set the current material filter. - - - - diff --git a/src/Tools/bindings/templates/templateClassPyExport.py b/src/Tools/bindings/templates/templateClassPyExport.py index 8da3e7b33e..9dc65a8e42 100644 --- a/src/Tools/bindings/templates/templateClassPyExport.py +++ b/src/Tools/bindings/templates/templateClassPyExport.py @@ -43,6 +43,7 @@ class TemplateClassPyExport(template.ModelTemplate): "Gui", "Part", "PartDesign", + "Material", ]: root, ext = os.path.splitext(path) return f"{root}_{ext}"