Material: Expanded Python API (#13829)

Expands the Python API to allow for material creation. With test cases.
This commit is contained in:
David Carter
2024-05-06 16:34:51 +00:00
committed by GitHub
parent b12b95b908
commit 3de35c9818
8 changed files with 358 additions and 46 deletions

View File

@@ -33,7 +33,7 @@
</Documentation>
<Parameter Name="LibraryIcon" Type="String"/>
</Attribute>
<Attribute Name="Name" ReadOnly="true">
<Attribute Name="Name" ReadOnly="false">
<Documentation>
<UserDocu>Model name.</UserDocu>
</Documentation>
@@ -47,23 +47,23 @@
</Attribute>
<Attribute Name="UUID" ReadOnly="true">
<Documentation>
<UserDocu>Unique model identifier.</UserDocu>
<UserDocu>Unique model identifier. This is only valid after the material is saved.</UserDocu>
</Documentation>
<Parameter Name="UUID" Type="String"/>
</Attribute>
<Attribute Name="Description" ReadOnly="true">
<Attribute Name="Description" ReadOnly="false">
<Documentation>
<UserDocu>Description of the material.</UserDocu>
</Documentation>
<Parameter Name="Description" Type="String"/>
</Attribute>
<Attribute Name="URL" ReadOnly="true">
<Attribute Name="URL" ReadOnly="false">
<Documentation>
<UserDocu>URL to a material reference.</UserDocu>
</Documentation>
<Parameter Name="URL" Type="String"/>
</Attribute>
<Attribute Name="Reference" ReadOnly="true">
<Attribute Name="Reference" ReadOnly="false">
<Documentation>
<UserDocu>Reference for material data.</UserDocu>
</Documentation>
@@ -81,13 +81,13 @@
</Documentation>
<Parameter Name="AuthorAndLicense" Type="String"/>
</Attribute>
<Attribute Name="Author" ReadOnly="true">
<Attribute Name="Author" ReadOnly="false">
<Documentation>
<UserDocu>Author information.</UserDocu>
</Documentation>
<Parameter Name="Author" Type="String"/>
</Attribute>
<Attribute Name="License" ReadOnly="true">
<Attribute Name="License" ReadOnly="false">
<Documentation>
<UserDocu>License information.</UserDocu>
</Documentation>
@@ -111,11 +111,31 @@
</Documentation>
<Parameter Name="Tags" Type="List"/>
</Attribute>
<Methode Name="addPhysicalModel" ReadOnly="false">
<Documentation>
<UserDocu>Add the physical model with the given UUID</UserDocu>
</Documentation>
</Methode>
<Methode Name="removePhysicalModel" ReadOnly="false">
<Documentation>
<UserDocu>Remove the physical model with the given UUID</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasPhysicalModel" ReadOnly="true">
<Documentation>
<UserDocu>Check if the material implements the physical model with the given UUID</UserDocu>
</Documentation>
</Methode>
<Methode Name="addAppearanceModel" ReadOnly="false">
<Documentation>
<UserDocu>Add the appearance model with the given UUID</UserDocu>
</Documentation>
</Methode>
<Methode Name="removeAppearanceModel" ReadOnly="false">
<Documentation>
<UserDocu>Remove the appearance model with the given UUID</UserDocu>
</Documentation>
</Methode>
<Methode Name="hasAppearanceModel" ReadOnly="true">
<Documentation>
<UserDocu>Check if the material implements the appearance model with the given UUID</UserDocu>
@@ -175,10 +195,20 @@
<UserDocu>Get the value associated with the property</UserDocu>
</Documentation>
</Methode>
<Methode Name="setPhysicalValue" ReadOnly="true">
<Documentation>
<UserDocu>Set the value associated with the property</UserDocu>
</Documentation>
</Methode>
<Methode Name="getAppearanceValue" ReadOnly="true">
<Documentation>
<UserDocu>Get the value associated with the property</UserDocu>
</Documentation>
</Methode>
<Methode Name="setAppearanceValue" ReadOnly="true">
<Documentation>
<UserDocu>Set the value associated with the property</UserDocu>
</Documentation>
</Methode>
</PythonExport>
</GenerateModel>